-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to auto restart on error #175
Comments
Do you mean like the On 23 May 2013 15:08, Benjamin Besse [email protected] wrote:
|
Yes,i mean like the 'forever' module if it's possible 👍 |
I'd love to see this too; a general restart on exit (error or clean). I know... forever... but... For local dev scripts that I don't care to add error handling and fancy stuff, Maybe call it --dev-restart or something that makes it obvious it's not a forever replacement? |
yep, this makes sense.. +1. It helps especially in the development env |
Not sure if I missed it, or it was recently added, but nodemon has I think |
Nodemon is only meant for development. This will restart app.js whenever it exits:
But I would recommend learning about |
What @mcjohnalds said |
The following set of npm scripts will mimic what nodemon is doing, but using PM2:
PM2's |
is it done ? I'd loooove the option, mostly on intended errors like: throw new Error() |
Any updates on this in 2020? Having the ability for it to restart on an error would be great, preferably with the delay. |
Yes, there was: #175 (comment) |
Hello, if we have an error, nodemon wait file modification or manually rs command but I run command in production server and I can not afford to let the server down for even just a few minutes. Would it be possible to add an option to automatically restart the server without any external help?
The text was updated successfully, but these errors were encountered: