Skip to content Skip to sidebar Skip to footer

Express.js Route That Responds To Any Subfolder Get Request

I am trying to set a route in express js that would be triggered by any query that would start with that route Url. For instance, I want to do the following in an html file:

Solution 1:

Turns out

app.get('/article/*',function(req,res) {
   // do something with req.path
}

works fine...


Post a Comment for "Express.js Route That Responds To Any Subfolder Get Request"