3 ms·
Add a route that does something like throw new Error('Uh oh') Error handling done right will include a way to catch the error. With current versions of Node
by mathrawka 13y ago
Add a route that does something like
throw new Error('Uh oh')
Error handling done right will include a way to catch the error. With current versions of Node.js that means to use domains.
And then you want to make sure that a crash will not cause other concurrent connections to get abruptly disconnected.
I have a few things in place that I use to get zero-downtime deploys and crash handling.
https://github.com/mathrawka/express-graceful-exit https://github.com/mathrawka/express-graceful-exit
https://github.com/mathrawka/express-domain-errors https://github.com/mathrawka/express-domain-errors
https://github.com/superjoe30/naught https://github.com/superjoe30/naught
- itamarweiss 13y agoSounds good. I'll have a look.