In Express, which method is used to start a server listening for connections?

  • app.listen()
  • server.start()
  • express.startServer()
  • node.start()
In Express, you use the app.listen() method to start a server that listens for incoming connections. This method binds the server to a specified port and hostname, allowing it to handle HTTP requests. The other options are not valid methods for starting an Express server.
Add your answer
Loading...

Leave a comment

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