Q:

express get url parameters

app.get('/path/:name', function(req, res) {
  res.send("tagId is set to " + req.params.name);
});
3
// http://localhost:8080/api/1
app.get('/api/:version', function(req, res) {
    res.send(req.params.version);
});
2
Route path: /users/:userId/books/:bookId
Request URL: http://localhost:3000/users/34/books/8989
req.params: { "userId": "34", "bookId": "8989" }
2

New to Communities?

Join the community