Skip to content

Instantly share code, notes, and snippets.

@anhnt
Created June 19, 2014 09:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anhnt/016edf56e0f3f977194a to your computer and use it in GitHub Desktop.
Save anhnt/016edf56e0f3f977194a to your computer and use it in GitHub Desktop.
forever nodejs
Forever works now on windows, I currently use it.
Just do:
npm install forever -g
and to run it, assuming you're in the app.js directory:
(sudo) forever -c node -w app.js
The -w is for watcher, optional.
Example of watcher configuration:
File .foreverignore:
# Avoid to restart the server when using forever on some file changes.
# General
**/.idea/**
**/.git/**
# Sails specifics
**/.tmp/**
**/views/**
**/assets/**
**/languages/**
**/documentation/**
**/logs/**
# Restart only when js and json files are changed.
!*.js*
# But don't restart on .map regeneration.
*.js.map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment