Skip to content

Instantly share code, notes, and snippets.

@justnom
Last active August 29, 2015 13:56
Show Gist options
  • Save justnom/8924418 to your computer and use it in GitHub Desktop.
Save justnom/8924418 to your computer and use it in GitHub Desktop.
Upstart job for a node.js application (this will log stderr/stdout to the log file)
description "my_nodejs_app"
start on (local-filesystems and net-device-up IFACE=eth0)
stop on shutdown
respawn
respawn limit 99 5
script
export HOME="/home/www/nodejs"
exec /usr/local/bin/node /home/www/nodejs/app.js >> /var/log/nodejs/myapp.log 2>&1
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment