Skip to content

Instantly share code, notes, and snippets.

@simianhacker
Created August 9, 2012 23:11
Show Gist options
  • Save simianhacker/3308895 to your computer and use it in GitHub Desktop.
Save simianhacker/3308895 to your computer and use it in GitHub Desktop.
Upstart template for Node.js
description "Node server for #{application} (#{node_env})"
start on (net-device-up
and local-filesystems
and runlevel [2345])
stop on runlevel [016]
script
exec sudo -u nobody sh -c "NODE_ENV=#{node_env} #{path_to_node} #{script_name}"
end script
respawn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment