To match a route for any HTTP method in Express.js, you can use the ______ method.

  • app.use
  • app.get
  • app.all
  • app.route
In Express.js, the app.all method is used to match a route for any HTTP method. It is often used for middleware that should apply to all HTTP methods for a specific route. The other options are specific to certain HTTP methods (app.get for GET requests, app.use for middleware, and app.route for creating route handlers).
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *