Last updated on 2/21/22
Are You Ready to Create a Basic Express Web Server?
- Create a basic Express web server
You use the
createServer()function when creating an HTTP server with Node. You can pass a function to
createServer()to react to incoming requests. Which arguments does that function receive?Careful, there are several correct answers.
The request object
The response object
The port environment variable
In an Express app, what must the final middleware applied to a route do to prevent a request from timing out?
Modify the status of the response object
Send the response back to the client
Modify the response headers
What is the
Sending the response back to the client
Preventing CORS errors
Passing execution to the next middleware
Parsing the body of a request