Learning on Web Dev Open is free for all.

Backend Engineering > A server from nothingNode with nothing on top
Phase 05A server from nothing236 of 434

Node with nothing on top

A JSON service using only node:http: your own router, your own body parsing, your own 404. Sixty lines, and no dependency you did not write.

Build45 minAI off

Build this in your own editor

This one runs on your machine rather than in the browser workbench. Work to the outcomes below, then come back and mark it complete.

You should now be able to

  • Serve JSON from a hand-written route table
  • Read and parse a request body from a stream
  • Set a status code and headers before writing a body
Ask the community

Loading…