Skip to content

Instantly share code, notes, and snippets.

@zacharyblank
Created December 2, 2014 16:03
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 zacharyblank/cf8932a66cc74ed83d03 to your computer and use it in GitHub Desktop.
Save zacharyblank/cf8932a66cc74ed83d03 to your computer and use it in GitHub Desktop.
upstart
description "Public node server"
author "Zachary Blank"
start on started mountall
stop on shutdown
# Automatically Respawn:
respawn
respawn limit 99 5
script
export NODE_ENV="dev"
export PORT=8020
exec /usr/bin/node /vagrant/web/server.js >> /var/log/public.log 2>&1
end script
post-start script
# Optionally put a script here that will notifiy you node has (re)started
# /root/bin/hoptoad.sh "node.js has started!"
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment