Our great sponsors
-
jsend
JSend is a specification for a simple, no-frills, JSON based format for application-level communication.
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
Programming errors are usually not handled in Node.js. When they occur Node.js process is terminated. This is because programming errors are usually not recoverable and the process should be terminated to avoid further damage. but we can listen to unhandledRejection and uncaughtException events to handle programming errors. But it is recommend to just let the process crash and restart it using a process manager like pm2
We have used Jsend to format our API response. This is it for this blog. I hope you enjoyed it. If you have any questions, feel free to email it :), I am not joking I don't have a comment section on my blog yet.