Skip to content

Instantly share code, notes, and snippets.

@janikvonrotz
Created March 4, 2014 14:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janikvonrotz/9347463 to your computer and use it in GitHub Desktop.
Save janikvonrotz/9347463 to your computer and use it in GitHub Desktop.
Ubuntu: Install npm package forever #Markdown #Node.js

Introduction

A simple CLI tool for ensuring that a given script runs continuously (i.e. forever).

Requirements

  • Ubuntu server
  • Node.js

Installation

Install forever

sudo npm install forever -g

Start Node.js application with forever

sudo NODE_ENV=production forever start index.js

Start Node.js application without forever

sudo npm start --production

List Node.js applications executed by forever

forever list

Stop forever applications

forever stop index.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment