Awaitjs Express

screenshot of Awaitjs Express
express

Write Express middleware and route handlers using async/await

Overview

@awaitjs/express is a module that provides middleware and route handlers for Express using async/await functionality. It offers the addAsync() function to enhance Express apps with async/await support and provides additional helper functions like useAsync(), getAsync(), etc. It also offers a Router() function as a replacement for express.Router() with async-friendly features and a wrap() function for more control over async Express middleware and route handling.

Features

  • addAsync(): Enhances Express app with async/await support
  • Router(): Provides a drop-in replacement for express.Router() with async-friendly features
  • decorateApp: Alias for addAsync()
  • decorateRouter: Alias for addAsync()
  • wrap(): Offers fine-grained control over async Express middleware with better error handling

Summary

@awaitjs/express is a helpful module for implementing async/await functionality in Express middleware and route handlers. With features like addAsync(), Router(), and wrap(), developers can easily work with asynchronous code in their Express applications with better error handling capabilities.

express
Express

Express.js is a simple Node.js framework for single, multi-page, and hybrid web applications.