You need the following:
- CouchDB server 1.3 (or newer) with the GeoCouch plugin.
- node.js (>= 0.8.0) and its great package manager
npm
. - Grunt - can be installed by running:
npm install -g grunt-cli
- Clone the repo:
git clone [email protected]:libremap/libremap-api.git
and change to the repo dir:cd libremap-api
. - Download dependencies:
npm install
. - Copy
couch.json.example
tocouch.json
and configure your CouchDB server there. - Push the CouchDB design document to your server (for example the
dev
target inconfig.json
) by runninggrunt push --couch dev
.
We would like to see more communities sharing their data with other communities. A one-shot replication can be carried out through CouchDB's web interface Futon (Tools -> Replicator). In order to set up a persistent replication, a new document has to be added to the automaticaly generated database _replicator:
{
"_id": "libremap.net-up",
"source": "libremap",
"target": "http://libremap.net/api/db",
"continuous": true,
}
After such a document has been added, the replication is persistent and thus the replication will continue after restarts of CouchDB.