Commit 1e4ef9b3 authored by Rodrigo Tapia-McClung's avatar Rodrigo Tapia-McClung

Update README

parent be480170
# PGServer
*Work in progress, many/some features still missing!*
# FORDECyT 2018-10
Another PostGIS http API server
Upload and download geo-data, preview, filter
Serve cached mapbox vector tiles (mvt), geojson, geobuf
Uses a stripped version of [pgserver](https://github.com/anneb/pgserver) (PostGIS http API server) to serve cached mapbox vector tiles (mvt), geojson, geobuf
Built on [Node Express](https://expressjs.com/)
## Requirements
* access to a [PostGIS](https://postgis.net) server
* Access to a [PostGIS](https://postgis.net) server
* [Node and npm](https://nodejs.org/en/download/)
## PostgreSQL user
......@@ -26,12 +23,11 @@ GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
CREATE USER <user> WITH PASSWORD '<pw>';
GRANT readaccess TO <user>;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO <user>;
```
-- Grant access to future tables on role and user
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO <user>;
```
Make sure to edit /etc/postgresql/10/main/pg_hba.conf line
......@@ -71,17 +67,15 @@ NodeJS requests will be routed to port 8090 :)
## 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](http://gitlab.geoint.mx/tapiamcclung/fordecyt2019/-/archive/master/fordecyt2019-master.zip) of the project instead.
git clone this_repository
cd this_repository
npm install
cp config/dbconfig.example.json config/dbconfig.json
# now edit config/dbconfig.json for your PostGis database
# now edit config/dbconfig.json for your PostGIS database
node pgserver.js
# point your browser to localost:8090 for more info
For interactive data browsing, preview, administration and api documentation, head to [http://localhost:8090](http://localhost:8090).
# point your browser to [http://localhost:8090](http://localhost:8090) for more info
### Attributions
API based on [Dirt Simple PostGIS http API](https://github.com/tobinbradley/dirt-simple-postgis-http-api)
\ No newline at end of file
[pgserver](https://github.com/anneb/pgserver)'s API is based on [Dirt Simple PostGIS http API](https://github.com/tobinbradley/dirt-simple-postgis-http-api)
\ No newline at end of file
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