Answers for "express path pararms\"

1

node express params

// url = /something/2?color1=red&color2=blue&type=square

app.get('/something/:id', (req, res) => {
  	req.params.id  === 2 // true
    req.query.color1 === 'red'  // true
    req.query.color2 === 'blue' // true
    req.query.type === 'square' // true
})
Posted by: Guest on January-18-2022

Code answers related to "express path pararms\"

Code answers related to "Javascript"

Browse Popular Code Answers by Language