How can I get GET parameters in an express route?
# requested path: /foo/1234?x=9
router.get('/foo/:id', function(req,res){
console.info(req.params.id); // 1234 - my url segment
?????; // 9
});
How can I get GET parameters in an express route?
# requested path: /foo/1234?x=9
router.get('/foo/:id', function(req,res){
console.info(req.params.id); // 1234 - my url segment
?????; // 9
});
You could get that by using req.query
http://expressjs.com/api.html#req
Just add this line