It's hard to debug express middleware without names #5413
pahaz
started this conversation in
Feature requests
Replies: 1 comment
-
|
Thanks for the suggestion @pahaz. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! Inside keystone sources we use
app.use(.., (req, res, next) => { .. }for creating express middleware.But if you try to debut it by
DEBUG=express:router NODE_ENV=production yarn devcommand.You will see something like:
It's hard to understand what's going during request handling.
It's better to named functions (
app.use(.., function name (req, res, next) { .. }). It will help to debug express routing.Beta Was this translation helpful? Give feedback.
All reactions