Node Essentials
An HTTP server
Lesson 5 of 5
A server is a function from request to response — routing just picks which function runs.
What you'll learn
- Create an HTTP server with http.createServer
- Route by method and path to the right handler
- Return JSON with the correct status and headers
Members only
A free account unlocks this lesson and every other one.
Runnable challenges, knowledge checks, and progress that syncs across your devices. No card needed.
Not sure yet? Try the free lesson first: Modules: ESM vs CommonJS