@joellesenne/express-async-handler

1.0.3 • Public • Published

Welcome to @joellesenne/express-async-handler 👋

Version Documentation Maintenance License: MIT Twitter: joellesenne

Simple Middleware to manage exceptions within express routes in asynchronous

🏠 Homepage

Table of Contents generated with DocToc

Prerequisites

  • npm >=7.13.0
  • node >=16.0.0

Install

npm install --save @joellesenne/express-async-handler

# OR
yarn add @joellesenne/express-async-handler

Usage

const asyncHandler = require('@joellesenne/express-async-handler')

express.get('/', asyncHandler(async (req, res, next) => {
  const bar = await foo.findAll();
  res.send(bar)
}))

Run tests

mocha test/index.test.js

Author

👤 Joël Lesenne

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.

Show your support

Give a ⭐️ if this project helped you!

📝 License

Copyright © 2021 Joël Lesenne.
This project is MIT licensed.


This README was generated with ❤️ by readme-md-generator

Dependencies (0)

    Dev Dependencies (5)

    Package Sidebar

    Install

    npm i @joellesenne/express-async-handler

    Weekly Downloads

    7

    Version

    1.0.3

    License

    MIT

    Unpacked Size

    17.1 kB

    Total Files

    12

    Last publish

    Collaborators

    • joellesenne