Skip to content

Instantly share code, notes, and snippets.

@andineck
Created November 21, 2013 13:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andineck/7581456 to your computer and use it in GitHub Desktop.
Save andineck/7581456 to your computer and use it in GitHub Desktop.
Start node.js app with forever
npm install forever -g
cd /path/to/your/node/app/
forever start --spinSleepTime 10000 app.js
# Where --spinSleepTime 10000 refers to the minimum uptime (in milliseconds) between launches of a crashing script. This command will work for almost all cases.
# Now point your browser to http://[your-vps-ip]:[port] and see your app running.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment