Our great sponsors
-
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.
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Node.js has had support for promises since v4.0.0 (released September 2015) and async / await since v7.6.0 (released February 2017). These JavaScript language features are now widely used across the Node.js ecosystem.
Restify - No native support yet. Support merged mid-2020, scheduled for a v9 release.
An excellent alternative to Express or Restify is the Fastify framework. It has full native support for async code and is in active development. There is also a fastify-express plugin available which can help ease your migration path away from Express.
Until you start using Node.js >= v15.0.0, you should use the make-promises-safe module in your Node.js applications. When an unhandled promise rejection occurs in your application, this module "prints the stacktrace and exits the process with an exit code of 1" (i.e. crashes your application).
Express - No native support for async code. There's not been a release of Express for almost 2 years now, so it looks unlikely that this framework will support async code any time soon. If you are unable to move away from Express at the moment, you can monkey patch in support for async / await.
Related posts
- Screen Sharing with WebRTC: Harnessing JavaScript for Seamless Streaming
- Express.js: Introduction and Basic Routing
- How to convert exist nodejs/expressjs app from javascript to typescript, the painless way
- ExpressoTS Middleware & Controller
- Express.js repo swamped with spam PRs thanks to YouTube tutorial