UNPKG

897 BMarkdownView Raw
1[![CircleCI](https://circleci.com/gh/mapbox/osm-comments-api/tree/master.svg?style=svg)](https://circleci.com/gh/mapbox/osm-comments-api/tree/master)
2
3# osm-comments-api
4Expose a RESTful API for OSM Notes and Changeset Comments.
5
6### Setup
7
8 - Get some data into your database, see https://github.com/mapbox/osm-comments-parser
9
10 - Run `npm install`
11
12 - Define an env var called `OSM_COMMENTS_POSTGRES_URL` eg `export OSM_COMMENTS_POSTGRES_URL='postgres://localhost/osm-comments'`
13
14 - Run server with `node run-server.js`
15
16 - Visit for eg. `http://localhost:8888/api/v1/notes` in your browser to see some JSON
17
18
19### Use as module
20
21 - You can also import and use this in your node project as a module. A simple example:
22
23 var api = require('osm-comments-api');
24 api.listen(8888);
25
26 ### Test
27
28 - Set an environment variabled called `TEST_PG_USER` with your postgres username
29 - Run `npm test`
\No newline at end of file