What is the proper way of using domain module in NodeJS applications?
try-catch blocks? If yes, should we create new instances of domain each time for each separated block?run method? If yes, is that really sufficient for an enterprise application for example?P.S. Is there any well-known open-source node project with an extensive use of domain module where I can study their code?
P.P.S. Looking at the node documentation and tutorials, I see that almost all of them just simply wrapped up the main function within the domain's run method, however as far as I can see they are mostly copying each other. I basically can't see how people use domain module in different situations (what I see is mostly a copy of node documentation with couple of minor changes)