• 10 hours
  • Medium

Free online content available in this course.

course.header.alt.is_video

course.header.alt.is_certifying

Got it!

Last updated on 11/24/21

Are You Ready to Create a Basic Express Web Server?

Log in or subscribe for free to enjoy all this course has to offer!

Evaluated skills

  • Create a basic Express web server
  • Question 1

    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  next  function

    • The port environment variable

  • Question 2

    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

    • Call the  next()  function

  • Question 3

    What is the  next()  function for?

    • Sending the response back to the client

    • Preventing CORS errors

    • Passing execution to the next middleware

    • Parsing the body of a request