2

I have node server which i run using forever. But each time if I edit my code I'll have to restart the server. I came across the module called hotnode which can perform live edits but will it have the same performance as the forever module or can I run my code using both the modules. I am confused. Any help wil be much helpful

2 Answers 2

2

Have a look at nodemon.

nodemon will watch the files in the directory that nodemon was started, and if they change, it will automatically restart your node application.

Sign up to request clarification or add additional context in comments.

3 Comments

forever is one module that restarts the server even if there is any error say if i hit my nodejs server with wrong request parameters then forever simply restarts my server.will nodemon handle that functionality along with live edit ?
You can mix nodemon with forever (see the --exitcrash option of nodemon)
I tried nodemon but it did not work in my linux server properly whereas node-supervisor was working fine.Which is the best module for working in production environment?
1

As an alternative to nodemon you can use node-supervisor.

I used to use nodemon, but for some reason it didn't detect code changes on my linux box, which supervisor did flawlessly.

The downside is that it doesn't (or at least didn't) give the colorful output nodemon gives.

2 Comments

nodemon has an option to be used along with forever.But can node-supervisor combined along with forever? because i am using forever in my production deployment.If there is any module that performs both the functionality of forever and live-edits it will be really helpful
@AmandaG i doubt that as they both serve roughly the same purpose, there's even an issue asking the same question

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.