express async wrapper that passes custom debug
instance or logging function
Install
npm i -S express-debug-async-wrap
or
npm install --save express-debug-async-wrap
Use
In your route: Require and initialize with debug
instance:
const debug = 'myNamespace:myRouteName'const wrapper = debugconst express = const router = express router moduleexports = router
In your main app:
const debug = 'myNamespace'const express = const app = // error handlerapp
Related
License
MIT Copyright © Diego Rodríguez Baquero