Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

is it possible get route definition over middleware

35 views
Skip to first unread message

Mochammad Lukman

unread,
Dec 20, 2016, 12:08:35 AM12/20/16
to Express
hi guys,

i already have something like this:

app.get('test_url/:some_param',(req, res, next) => {
        console.log(req.route)
        res.send('test page')
})

to show route definition like : test_url/:some_param
but when i get it from middleware in the same way i get undefined result,
after try console the req value i just got Url key which the value is something like: test_url/12345
this is not what i want.

my question is: is it possible get route definition over middleware?

i will very thankfully if some one get me any possible answer.
and sorry for my bad in english
regard
Reply all
Reply to author
Forward
0 new messages