Sign inSign up

noerw/opensensemap-api

By noerw

Updated almost 10 years ago

osem api fork - mobile sensebox

Image
0

252

noerw/opensensemap-api repository overview

openSenseMap-API

Join the chat at https://gitter.im/sensebox/openSenseMap-API This is the back-end for openSenseMap.

openSenseMap is part of the senseBox project. To get more information about openSenseBox and senseBox visit the before mentioned links or have a look at this video.

The API has been built as part of my bachelor thesis at the ifgi (Institute for Geoinformatics, WWU Münster).

Technologies
Install dependencies (Ubuntu)

It is assumed that you have installed node.js (developed using 0.10.26).

Install MongoDB according to the manual and create the database "OSeM-api".

The database schema will be created automatically upon data insertion and looks like this:

Database "OSeM-api"
  - Collections
    - boxes
    - measurements
    - users
Run for Development & Production

Open the configuration file config/index.js and change settings accordingly.

Variable nameExplanation
exports.targetFolderThe folder where a generated Arduino sketch for each box will be saved upon registration
exports.imageFolderThe folder where banner images for boxes are stored, should be in your htdocs (make sure read and write permissions are correct)
exports.dbuserMongoDB database user, leave empty if not configured
exports.dbuserpassMongoDB database password, leave empty if not configured

After that, run the following command to install dependencies:

npm install

Then start the API process, press CTRL+C to stop:

node app.js

or with Docker

  • install docker and docker-compose
  • run docker-compose up
Create the JSDoc pages

To create the documentation you need apidocjs and run:

apidoc -e node_modules/

To push a new Version to gh-pages run:

git subtree push --prefix doc/ origin gh-pages
License

MIT - Matthias Pfeil 2015

Tag summary

Content type

Image

Digest

Size

279.5 MB

Last updated

almost 10 years ago

docker pull noerw/opensensemap-api