Before you start, make sure you have a recent version of NodeJS environment >=6.0.
From the project folder, execute the following commands:
npm install
cd person-records-service
npm run start
The server should now be running on localhost:1337
Then run the tests:
npm run test
This is a sailsJS webserver. Most of the code is boilerplate sails code. Please note the following:
- config/routes - this sets up the routing (see http://sailsjs.org/documentation/concepts/routes for more info.)
- api/controllers contains the RecordController referenced in the routes.
- api/services contains most of the business logic.
- api/hooks contains a hook that seeds the db on startup.
- config/connections sets the db as sails-disk (which is available out of the box)
- api/spec contains the unit tests.
- api/mocks contains any mocks (used in testing).
- aurelia-dependency-injection is used as a DI framework. See app.js for the DI setup.