I am using Express with Node and I have a requirement in which the user can request the URL as: http://myhost/fruit/apple/red.
http://myhost/fruit/apple/red
Such a request will ret
app.get('/fruit/:fruitName/:fruitColor', function(req, res) { var data = { "fruit": { "apple": req.params.fruitName, "color": req.params.fruitColor } }; send.json(data); });
If that doesn't work, try using console.log(req.params) to see what it is giving you.