Skip to main content
11 events
when toggle format what by license comment
Oct 21, 2019 at 13:00 comment added Doc Brown Related (on Quora): What are the pros and cons of Node.js versus Apache web server?
Oct 20, 2019 at 20:22 comment added Ewan @caleb sure I think thats what im saying in my answer. nodejs fails as a webserver by itself
Oct 20, 2019 at 18:19 comment added Caleb @ewan - asp != .net, Ruby "on rails" != Ruby. Those are frameworks on top of the code "runtime environment". Node.js is the runtime environment. Express (a framework in node.js) DOES handle errors automatically for you. expressjs.com/en/guide/error-handling.html
Oct 20, 2019 at 8:40 comment added Ewan I completely agree with your answer @gorgikosev whats missing is a framework to properly handle web requests. It simply shouldnt be possible for page level code to crash the webserver so easily
Oct 20, 2019 at 8:36 comment added Ewan ie. from a software architecture perspective, the solution should be at the webserver level, not in your code
Oct 20, 2019 at 8:36 comment added Gjorgi Kjosev Its not always that simple, as shared resources (e.g. DB connections from the connection pool) might be in a bad state. I've written something about what I think the best strategy is here: stackoverflow.com/questions/19528705/…
Oct 20, 2019 at 8:35 comment added Ewan @doc it seems to me that 'use another web server' is the answer here. This question would not come up in asp or php or ruby on rails etc because the framework provides the basic function of unhandled exception processing.
Oct 20, 2019 at 8:31 comment added Ewan I'd expect that call to crash and return an error code, while the envrionment continues to accept and process other calls
Oct 20, 2019 at 7:00 comment added Doc Brown The information behind the link is fine in this answer, but everything else does not seem to apply to node.js. And "use a different web server" is pretty much a non-answer.
Oct 20, 2019 at 4:32 comment added Caleb Of course node.js crashes if it gets an unhandled error. What would you expect it to do? It is just a basic code runtime environment. Would you expect a Java console program to not crash on an unhandled exception? The better suggestion for node would be to use a library like express/koa to handle the basic http server stuff. And setup a basic error handling middlewear handle exception cases.
Oct 19, 2019 at 20:28 history answered Ewan CC BY-SA 4.0