# A Web Server with Node's http Module

Node's own http module starts a web server that keeps running and calls your function once for every request, which reads req.method and req.url and answers with res.writeHead and res.end.

![Cheat sheet for A Web Server with Node's http Module: Node's own http module starts a web server that keeps running and calls your function once for every request, which reads req.method and req.url and answers with res.writeHead and res.end.](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/8a0438626e684c82825e399a1d387ff3.webp)

- Category: Node.js
- Level: Apprentice
- Tags: http Module, localhost, nodejs, port, req and res, Web server, web-development
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/node-http-first-server-cheat-sheet
