vercel / micro-dev

The development environment for `micro`
MIT License
704 stars 76 forks source link

Doesn't restart on crash/Unhandled Exception #67

Open marvinhagemeister opened 6 years ago

marvinhagemeister commented 6 years ago

micro-dev is really awesome some for. Love the attention to detail you put into it and the hot reloading is ace. There is one thing that is bugging me though and that is that the server is never restarted upon receiving an unhandled exception.

While developing and encountering an error, I was initially confused why the server didn't accept any new connections anymore.

To fix that I made a small wrapper that acts as a supervising process that can restart the child process (micro-dev) automatically in such cases. Would love if this feature would be built-in.

leo commented 6 years ago

Yea, I noticed this myself. We should be using process.on('uncaughtException', ...).