Repository for the message API
The documentation for the API lives here: http://docs.tidepoolmessages.apiary.io/
Requirements:
Clone this repo then install dependencies:
$ npm install
Assuming you have a set of config values (see "Config" below), load them with:
source config/local.sh
If running locally, you will need to start a local instance of MongoDB:
grunt start-mongo
Start the server for the API with:
grunt start-api
To run the integration tests in three seperate terminal windows do the following
grunt start-mongo
grunt start-api
grunt test
By default, the message-api runs on port 3002. You can change this by setting the PORT
environment variable.
Configuration is handled by env.js
and loads environment variables. Check the file for defaults and documentatio.
You can set environment variables manually, or use a bash script. For example:
source config/dev.sh
Ask the project owners to provide you with config scripts for different environments, or you can create one of your own. It is recommended to put them in the config/
directory, where they will be ignored by Git.