Created
May 20, 2015 08:17
-
-
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…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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