Commit c93728c6 authored by Anne Blankert's avatar Anne Blankert

add README

parent d599e719
# PGServer
Another PostGIS http API server
Upload and download geo-data, preview, filter
Serve cached mapbox vector tiles (mvt), geojson, geobuf
Built on [Node Express](https://expressjs.com/)
## Requirements
* access to a [PostGIS](https://postgis.net) server
* [Node and npm](https://nodejs.org/en/download/)
## 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.
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
npm start
# point your browser to localost:8090 for more info
### Due credit
API based on [Dirt Simple PostGIS http API](https://github.com/tobinbradley/dirt-simple-postgis-http-api)
\ No newline at end of file
...@@ -88,7 +88,7 @@ const sql = (params, query) => { ...@@ -88,7 +88,7 @@ const sql = (params, query) => {
* pattern: '^-?[0-9]{0,20}.?[0-9]{1,20}?(,-?[0-9]{0,20}.?[0-9]{1,20}?){2,3}$' * pattern: '^-?[0-9]{0,20}.?[0-9]{1,20}?(,-?[0-9]{0,20}.?[0-9]{1,20}?){2,3}$'
* responses: * responses:
* 200: * 200:
* description: geojson * description: geobuf data
* 422: * 422:
* description: invalid datasource or columnname * description: invalid datasource or columnname
*/ */
......
...@@ -20,6 +20,7 @@ const login = require('./login.js')(app); ...@@ -20,6 +20,7 @@ const login = require('./login.js')(app);
const upload = require('./upload.js')(app); const upload = require('./upload.js')(app);
const mvt = require('./mvt.js')(app, readOnlyPool); const mvt = require('./mvt.js')(app, readOnlyPool);
const geojson = require('./geojson.js')(app, readOnlyPool); const geojson = require('./geojson.js')(app, readOnlyPool);
const geobuf = require('./geobuf.js')(app, readOnlyPool);
const list_layers = require('./list_layers')(app, readOnlyPool); const list_layers = require('./list_layers')(app, readOnlyPool);
const bbox = require('./bbox.js')(app, readOnlyPool); const bbox = require('./bbox.js')(app, readOnlyPool);
......
...@@ -23,7 +23,7 @@ const swaggerDefinition = { ...@@ -23,7 +23,7 @@ const swaggerDefinition = {
const swaggerJSDocOptions = { const swaggerJSDocOptions = {
swaggerDefinition, swaggerDefinition,
apis: ['./login.js', './mvt.js', './list_layers.js', './bbox.js', './geojson.js'] apis: ['./login.js', './mvt.js', './list_layers.js', './bbox.js', './geojson.js', './geobuf.js']
} }
const swaggerSpec = swaggerJSDoc(swaggerJSDocOptions); const swaggerSpec = swaggerJSDoc(swaggerJSDocOptions);
......
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