⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

simple express monkey patch for async handlers support

License

Notifications You must be signed in to change notification settings

dvpnt/express-async-patch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@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)

About

simple express monkey patch for async handlers support

Resources

License

Stars

Watchers

Forks

Packages

No packages published