get url from http request expressjs code example
Example 1: express route parameters
app.get('/users/:userId/books/:bookId', function (req, res) {
res.send(req.params)
})
Example 2: node js http request express
npm install [email protected]
app.get('/users/:userId/books/:bookId', function (req, res) {
res.send(req.params)
})
npm install [email protected]