a Sails application
sudo apt-get install nodejs
sudo npm install -g sails
sudo npm install -g coffee-script
sudo npm install -g mocha # for the tests
npm install
as the postgres user:
sudo -u postgres createuser -s -P analysis # enter password: analysis
sudo -u postgres createdb analysis -O analysis
To run all the tests:
grunt test
To run a specific test file, e.g. User.test.coffee
mocha test/unit/User.test.coffee
forever -w start app.js
forever logs app.js -f
forever stop app.js