Skip to content

Instantly share code, notes, and snippets.

View jcarter62's full-sized avatar

Jim Carter jcarter62

  • Sacramento CA
  • 05:17 (UTC -07:00)
View GitHub Profile
@jcarter62
jcarter62 / node-deploy-as-upstart-service.md
Created November 16, 2015 00:58 — forked from learncodeacademy/node-deploy-as-upstart-service.md
Deploy Node.js app on Ubuntu as Upstart Service - instead of using Forever

Deploying a node app with Forever is great...until your server restarts unexpectedly. Then your app stops running and you have to re-deploy.

To get around this, we're going to run our node app as an Upstart service. Upstart services are great, because, once started, the system auto-restarts them if they fail, or if the server restarts.

###Step 1: Create a service for your node app

  • ssh in as root ssh root@youripaddress
  • Create a node-app.conf file in /etc/init
    IMPORTANT: whatever filename you pick is what you will use to start|stop|restart your service i.e. service node-app start
@jcarter62
jcarter62 / ubuntu-survival-guide.md
Last active May 20, 2018 17:40 — forked from tsaqib/ubuntu-survival-guide.md
Ubuntu Survival Guide