Replies: 2 comments 2 replies
-
Sure! Actually you're just seeing a product of how things are JSON serialized... RegExp becomes To view the regex, you'll actually need to explicitly call a So to see your routes more effectively, I might try the following: const routes = router.routes.map(([method, regex]) => [method, regex.toString()])
console.log(JSON.stringify(routes)) That'll at least show you the human-readable regex to see where the disconnect is. :) I'm also happy to discuss your actual code on Discord (or Zoom) if you're still stuck! |
Beta Was this translation helpful? Give feedback.
-
@danbars - as of v4.x, you can actually check
Hope that helps a bit as well! // assumes v4.x
router.get('/foo/:bar/:baz?', ({ route }) => route) // '/foo/:bar/:baz?' |
Beta Was this translation helpful? Give feedback.
-
Is there anything that I can log to:
I have a route that seem to be not-mathced for no apparent reason, and I'm not sure how to debug this.
I've seen some threads that mentioned:
This didn't work though... Options came out
{}
Another thing that I've tried:
This printed:
so I still didn't get any hint on the inners of the router...
Any idea?
Beta Was this translation helpful? Give feedback.
All reactions