Skip to content

evilbikes79/sails_rest_testing_service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Analytics REST Test service

A REST service for transmitting JSON-LD based learning object FIXTURES.

The Tech

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.

Project Requirements

  1. Install Node JS and NPM (NPM comes with node).

  2. Install Git.

  3. Clone the repository

Project Setup

From the project directory , run the following from the command line:

  1. Install Grunt CLI and the Sails CLI global dependencies:

    npm install grunt-cli sails node-inspector -g

  2. 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

Available Build, Test and Deploy Grunt Commands

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`

Environmental Settings

There are two environments are provided development, and `production.

  • development Any client side code optimizations will be switched off. All code watchers are turned on.
  • production All 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

Running The Project

There are a couple of ways to start the project.

  1. Using sails run the command:

    sails lift

  2. Using Node's command line:

    node app

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •