Give middleware function a name
daniellockyer opened this issue Β· comments
Daniel Lockyer commented
Hey @azu! π
Would it be possible to give the middleware function a name? Tools such as New Relic report it as <anonymous>
otherwise, which makes it difficult in tracking down the source.
azu commented
Yes, it is possible and reasonable.
- lazyRouter.use((req, res, next) => {
+ lazyRouter.use(function lazyRouterHandler(req, res, next) {
Daniel Lockyer commented
PR sent π
azu commented
Fixed in https://github.com/azu/express-lazy-router/releases/tag/v1.0.6
Thanks for PR!