Donât Forget About Proper Error Handling
Now that your server is talking to the world and you can see whatâs going on there, we have another important topic to discussâerrors.
Due to the single-threaded nature of Node.js and the lack of default configuration, a single error could bring the entire application crashing down, something we definitely donât want.
Error handling has been left in the hands of the programmers, and because of the nature of Node.js, itâs somewhat complicated to implement correctly.
Letâs investigate the various ways to address error handling in Node.js. There are several layers of implementation, and the best one to use would depend on the scale and nature of the application.
Keep the Process Alive
First, ...
Get Secure Your Node.js Web Application now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.