Created
June 19, 2014 09:57
-
-
Save anhnt/016edf56e0f3f977194a to your computer and use it in GitHub Desktop.
forever nodejs
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
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