expressjs req.body.parameters code example
Example 1: expressjs req.body.parameters
app.get('/user/:id', (req, res) => {
console.log(req.params.id) // "1234562134654"
})
or
app.get('/user/:user_id', (req, res) => {
console.log(req.params.user_id) // "1234562134654"
})
Example 2: express req body
app.post('/login', (req, res) => {
console.log(req.body.email) // "[email protected]"
console.log(req.body.password) // "helloworld"
})