@dvpnt/express-async-patch

1.0.0 • Public • Published

@dvpnt/express-async-patch

Build Status Coverage Status NPM Version

Simple express monkey patch for async handlers support.

Installation

$ npm install @dvpnt/express-async-patch

Usage

require('@dvpnt/express-async-patch');

const express = require('express');

const app = express();

app.get('/', async () => {
	await Promise.reject(new Error('async error'));
});


app.use((err, req, res, next) => {
	console.log(err.message); // async error

	res.json({error: err.message});
});

License

The MIT License (MIT)

Readme

Keywords

none

Package Sidebar

Install

npm i @dvpnt/express-async-patch

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

3.41 kB

Total Files

4

Last publish

Collaborators

  • dvpnt