Search code examples
node.jsforever

automatically restarting service via forever for nodejs


I found that forever can run nodejs server forever. Is forever supports this feautre?

-- If the nodejs script is modified changed, the server shld restarted automatically.

How can I enable this feature using forever? or I need something else?


Solution

  • I personally use Nodemon to handle that. Its a replacement for the node server. It automatically restarts the server when your files are updated. You might want to check it out.