This repository serves as the backend API for the Locus app. Everything is written in ES6+, so Babel is used to transpile into ES5.
The API uses MongoDB, so make sure it's installed.
Run a new instance of MongoDB:
sudo mongod
Start running the server:
npm start
The API listens onto a dynamic IP address for development. This address will be given after running the above command.
Flow is being used to allow for statically typed JavaScript, make sure it's installed globally.
After creating new methods, run the following command and deal with any output properly:
flow
No unit or integration tests have been written yet, however they will be using Mocha and Chai.
To run unit tests:
npm test
Since ES6+ is not understood natively, a transpiled build needs to be created before pushing to a live production server. To create this build, run the following command:
npm run build
This command will generate a new build
directory with files in ES5.
Property | Description | Type | Default Value |
---|---|---|---|
msrp |
Manufacturer's suggested retail price in local currency. | Number |
- lat, long
- address eg. 123 Main Street