Skip to content

Instantly share code, notes, and snippets.

@dreammonkey
Last active October 9, 2016 22:55
Show Gist options
  • Select an option

  • Save dreammonkey/e082475e27bae9fae71a to your computer and use it in GitHub Desktop.

Select an option

Save dreammonkey/e082475e27bae9fae71a 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