Nodejs Sailsjs Forever
Run sails with forever.
Install forever
:
npm install forever -g
Assuming you already have sails
installed and have created an app, cd to the root directory of your app.
Add a .foreverignore
, using nano:
nano .foreverignore
List files to be ignored by forever
on reload:
**/.tmp/**
**/views/**
NOTE: If you installed sails
globally, you need to make it available into your Sails application
You don't sails lift
, you use:
forever -w start app.js
It will run in the background, to see forever
running apps:
forever list
To stop the sails
application:
forever stop app.js
NOTE: If you have multiple running applications with the same name, you will have to address them by it's forever
index:
forever list
data: uid command script forever pid logfile uptime
data: [0] UAGg /usr/local/bin/node app.js 29221 29243 /Users/goliatone/.forever/UAGg.log 0:0:0:1.653
The index is the number between the square brackets.