This is the back-end for openSenseMap.
openSenseMap is part of the senseBox project. To get more information about openSenseMap and senseBox visit the before mentioned links or have a look at this video.
Originally, this API has been built as part the bachelor thesis of @mpfeil at the ifgi (Institute for Geoinformatics, WWU Münster).
It is assumed that you have installed node.js Version 6 LTS. Install dependencies with yarn
yarn install
There are several config keys in config/index.js
. These can also be configured through environment keys. Just prefix your environment keys with OSEM_
to be read by the api.
The API needs a running MongoDB instance with a OSeM-api
database and credentials.
The best way to run the database for development is to use the supplied docker-compose.yml
and run
docker-compose up -d db
You can require several parts of the API in other projects.
Install it as dependency
# for specific branch/commit/tag append #<branch/commit/tag>
yarn add git://github.com/sensebox/openSenseMap-API.git
This allows you to use parts like models and decoding in your own project. See index.js
.
To create the documentation you need apidocjs and run:
apidoc -e node_modules/
You can run the tests in containers using docker and docker-compose.
# Only run this once or every time you change dependencies in package.json
docker-compose -p osemapitest -f tests-docker-compose.yml build osem-api
./run-tests.sh
Look at the OSeM-compose repository. It contains a deployment with docker compose.
MIT - Matthias Pfeil 2015 - 2017