Blog2013 ≫ nodejs + express + domains

Why can't I find a good example of nodejs 1 using express and domains? I am banging my head against the desk here... The issue we have is what if we have an uncaught exception in some code - we want to spot that there was an error, and fail nicely, but we don't want to kill off any other requests currently being handled.

I'm seeing lots of example code out there that is quite close, but not close enough. And they all look like they've been copied from the same example.

UPDATE: I forgot to mention that it is all of those things combined wiht cluster that is really causing the issue. So I'm giving up on domains and rolling my own, just disconnecting the worker from the cluster.

  1. Javascript (programming language of the web) on the server side.

⬅️ :: ➡️

Paulʼs weblog - I live near Folkestone, Kent. Wed + dad to 2, I'm a full-stack web engineer, + I do js / node, some ruby, other languages etc. I like pubbing, running, restaurants, home automation 🤖 and other diy jiggery-pokery, history, tree stuff, TV, squirrels, pirates ☠️, lego, + time travel.