Last active
February 4, 2017 00:19
-
-
Save dantheman213/14892e0880430a6573d940a7f1e3cf51 to your computer and use it in GitHub Desktop.
NodeJS 'Upstart' Start-up script. Works on Ubuntu 14.04.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!upstart | |
# NodeJS 'Upstart' Start-up script. | |
# Works on Ubuntu 14.04. Systemd is being used for Ubuntu 16.04 though. | |
description "your node js web app" | |
start on started mountall | |
stop on shutdown | |
# Automatically Respawn: | |
respawn | |
respawn limit 99 5 | |
env NODE_ENV=production | |
script | |
cd /opt/yournodejsapp | |
exec npm start >> /var/log/yournodejsapp.log 2>&1 | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment