001 / building
tiny-http
A Node server with no framework, small enough that the request is still visible.
What
http.createServer, a switch on method and path, and a response that is explicitly ended. No router, no middleware, no JSON helper until the raw version is boring.
Why
The framework project needs a floor. If I cannot say what the platform already does, the framework starts inventing features for problems Node already solved.
Architecture
One listener. The request is a stream. The response is a stream. Headers are a map I set before the body. That is the whole machine. Anything with a name like "app" would be a layer on top, and this note refuses the layer.
Discoveries
The awkward part is not the routing table I do not have yet. It is remembering that the body arrives in chunks, and that res.end is a decision. Forgetting it looks like a slow client. It is a server that never finished speaking.