Skip to content

Latest commit

 

History

History
73 lines (45 loc) · 1.51 KB

README.md

File metadata and controls

73 lines (45 loc) · 1.51 KB

message-api

Repository for the message API

Build Status

The documentation for the API lives here: http://docs.tidepoolmessages.apiary.io/

Install

Requirements:

Clone this repo then install dependencies:

$ npm install

Quick start

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

Running Integration Tests

To run the integration tests in three seperate terminal windows do the following

grunt start-mongo
grunt start-api
grunt test

Config

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.