Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save crawc/fb433fc0a64138371760838eeada7173 to your computer and use it in GitHub Desktop.
Save crawc/fb433fc0a64138371760838eeada7173 to your computer and use it in GitHub Desktop.
Sails.js
Sails.js
first install sails gloabaly:
sudo npm install -g sails
During development, Sails auto generates all your js, less, image files in the assets folder.
everything in /assets/* will be accesible through: http://localhost:1337/*
Install forever. (Other packages are available for this, but this is what I use)
[sudo] npm install forever -g
Create your new Sails.js application wherever you want:
sails new awesomeApplication
cd awesomeApplication
Now you want to add a file called .foreverignore
nano .foreverignore
Add the following lines to the file
**/.tmp/**
**/views/**
**/assets/**
Now when you lift your application instead of using
sails lift
you use...
forever -w -f start app.js
# -w to watch for file changes!
# -f to keep seeing the stdout logs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment