Commit 1085dfec authored by Rodrigo Tapia-McClung's avatar Rodrigo Tapia-McClung

update README

parent b7ff4498
# PGServer # PGServer
*Work in progress, many/some features still missing!* *Work in progress, many/some features still missing!*
Another PostGIS http API server Another PostGIS http API server
Upload and download geo-data, preview, filter Upload and download geo-data, preview, filter
Serve cached mapbox vector tiles (mvt), geojson, geobuf Serve cached mapbox vector tiles (mvt), geojson, geobuf
Built on [Node Express](https://expressjs.com/) Built on [Node Express](https://expressjs.com/)
...@@ -11,6 +11,34 @@ Built on [Node Express](https://expressjs.com/) ...@@ -11,6 +11,34 @@ Built on [Node Express](https://expressjs.com/)
* access to a [PostGIS](https://postgis.net) server * access to a [PostGIS](https://postgis.net) server
* [Node and npm](https://nodejs.org/en/download/) * [Node and npm](https://nodejs.org/en/download/)
## PostgreSQL user
User should **only** have SELECT right on tables. You can create one as follows:
```sql
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;
-- Create a final user with password
CREATE USER <user> WITH PASSWORD '<pw>';
GRANT readaccess TO <user>;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO <user>;
```
Make sure to edit /etc/postgresql/10/main/pg_hba.conf line
`local all all peer`
to
`local all all md5`
## Installation ## Installation
If you don't have git, you can donwload [a zip file](https://github.com/anneb/pgserver/archive/master.zip) of the project instead. If you don't have git, you can donwload [a zip file](https://github.com/anneb/pgserver/archive/master.zip) of the project instead.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment