Can multiple interfaces be requested in one route of express?

can multiple interfaces be requested in an express route and then output to the page together

Mar.06,2021

Yes:

learn to read the documents. Oh,

/
app.route('/book')
  .get(function(req, res) {
    res.send('Get a random book');
  })
  .post(function(req, res) {
    res.send('Add a book');
  })
  .put(function(req, res) {
    res.send('Update the book');
  });

see the express document: ide/routing.html" rel=" nofollow noreferrer "> http://www.expressjs.com.cn/g.

Menu