You have to use a watcher like forever, nodemon, or something else…
Example
-
Install forever by running:
sudo npm install -g forever
-
Run it:
forever -w start app.js
To avoid infinite restart because Sails writes into .tmp
folder, you can create a .foreverignore
file into your project directory and put this content inside:
**/.tmp/**
**/views/**
**/assets/**
See the issue on GitHub:
Forever restarting because of /.tmp.