Janik von Rotz


1 min read

Install npm package forever

This post is part of my Your own Virtual Private Server hosting solution project.
Get the latest version of this article here: https://gist.github.com/9347463.

Introduction

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

Requirements

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

Categories: JavaScript development , Web server
Tags: application , npm , package
Edit this page
Show statistic for this page