In Express.js, which method is used to define a route that should respond to HTTP GET requests?

  • app.post()
  • app.get()
  • app.put()
  • app.delete()
In Express.js, the app.get() method is used to define a route that should respond to HTTP GET requests. It is used to handle GET requests for a specific URL path. The other options (app.post(), app.put(), and app.delete()) are used for different HTTP methods.
Add your answer
Loading...

Leave a comment

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