This is the back-end for openSenseMap.
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
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
require() openSenseMap-API for other projects
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
Create the JSDoc pages
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
Running in Production
Look at the OSeM-compose repository. It contains a deployment with docker compose.
MIT - Matthias Pfeil 2015 - 2017