I am using Express to handle a route which is in the format of /articles/:year/:month/:day
, where year, month and day are optional.
This type of route is not likely to work because of the underscores in the parameters passed.
app.get('/products/:product_Id/buyers/:buyer_Id', function(req, res) {
getArticles(req.params.product_Id, req.params.buyer_Id);
}
So i suggest you use the following route system if the route is not working. There you will be able to send multiple parameters.
app.get('/products/:productId/buyers/:buyerId', function(req, res) {
getArticles(req.params.productId, req.params.buyerId);
}