Skip to content

Instantly share code, notes, and snippets.

@shovon
Created June 23, 2014 16:25
Show Gist options
  • Save shovon/34b14e5c4213d51e4176 to your computer and use it in GitHub Desktop.
Save shovon/34b14e5c4213d51e4176 to your computer and use it in GitHub Desktop.
Upstart job for any Node.js application, with Node.js versions managed using NVM.
description "<Application name here>"
start on runlevel [23]
stop on shutdown
script
cd <path/to/project/here>
export NODE_ENV=production
# Be sure to have a `start` script in your `package.json`
<path/to>/.nvm/<version number>/bin/npm start
end script
respawn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment