New: Cookbooks and AI ExplanationsStep-by-Step recipes to solve problems connected to Roadmaps and Cheat Sheets. Need more details? Use AI buttons for structured and simple explanations with concrete examples throughout the whole platform.Take a look
Every static-file tutorial reaches for Express before you've even seen what the http module does on its own.
What you'll have at the end
A working server that lists a folder's files and serves any one of them by name, no framework installed
You need
A folder of plain files already on disk and ready to serve (pages, styles, scripts), and a Node project with no packages installed yet.
Not covered
Byte-range requests for resuming a download or seeking through a video, which need a different response than a plain whole-file serve.
Stream a log file too big to fit in memory
when what's being sent back is generated or filtered on the fly instead of an unchanged file already on disk, which needs the fuller streaming pattern that one walks through.
Shut a server down cleanly on a stop signal
once this server has to keep running behind real deploys, so a redeploy doesn't cut off a response already in flight.
Checked 25 Aug 2026
Part of the Node.js cookbook