A REST service for transmitting JSON-LD based learning object FIXTURES.
The "glue code" libraries being used:
- Node JS for HTTP serving and server JS moduling.
- Node Package Manager for server JS package managing.
- Git for source controlling.
- Sails JS for javascript web application structuring and API supporting.
- Grunt for server and client JS building and tasking.
- YUIDoc for JS documenting.
- Mocha for JS unit testing.
- Chai for unit test asserting.
- When JS A solid, fast Promises/A+ implementation and other asyncing.
- Waterline for validation, casting and object persisting.
From the project directory , run the following from the command line:
-
Install Grunt CLI and the Sails CLI global dependencies:
npm install grunt-cli sails node-inspector -g
-
Install all of the local server side JavaScript dependencies:
npm install
Note: Linux/Unix/Mac OS users will have prefix all npm install commands with sudo, like so:
sudo npm install grunt-cli sails node-inspector -g
sudo npm install
There are a number of Grunt based targets that are used for running different build tasks:
grunt build: Build accessible stand alone version.grunt test: Run all js Mocha unit tests headless in PhantomJS.grunt yuidoc: Generate code documentation.
To get a list of all available grunt targets run
'grunt --help`
There are two environments are provided development, and `production.
developmentAny client side code optimizations will be switched off. All code watchers are turned on.productionAll code is optimized for fast loading and performance. All development and debug hooks are disabled.
To run with a different environment, just specify NODE_ENV as you call grunt:
$ NODE_ENV=production grunt
If you are using node directly instead of grunt, it is very similar:
$ NODE_ENV=test node app
There are a couple of ways to start the project.
-
Using sails run the command:
sails lift
-
Using Node's command line:
node app