Skip to content

Instantly share code, notes, and snippets.

@bazzooka
Created July 18, 2015 20:08
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 bazzooka/e18540a1e15009d88155 to your computer and use it in GitHub Desktop.
Save bazzooka/e18540a1e15009d88155 to your computer and use it in GitHub Desktop.
Add node program at Ubuntu startup

Installation

  • Install forever with global option
sudo npm install -g forever

Making your forever app launch at boot using Ubuntu If you've installed forever and Node.js system-wide (so that they are located somewhere in $PATH), you can have your app started by forever at system-boot using Ubuntu's upstart. 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment