Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save light9/cae4caaf27c142f2c39a to your computer and use it in GitHub Desktop.

Select an option

Save light9/cae4caaf27c142f2c39a to your computer and use it in GitHub Desktop.
install forever to run nodejs as service. logs in a hidden .forever directory in the home directory of the user you ran forever as. Startup: All you need to do is create a file named something like myapp.conf in /etc/init with the following contents: --- start on startup exec forever start /full/path/to/test.js --- http://www.slidequest.com/Tabo…
sudo npm -g install forever
export PATH=$PATH:/usr/local/bin
export NODE_PATH=$NODE_PATH:/usr/local/lib/node_modules
ln -s /usr/bin/nodejs /usr/bin/node
forever start test.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment