Lesson 5.4
Keyed by method, and the App that owns the router
Why the router keeps one whole tree per HTTP method, the App that composes the Router with the Server, strict option validation, the dispatch entry, the byte-frozen 404 miss path, and the public barrel.
What you will build
- Explain the one-tree-per-method design and why the hot path never tests a method below the tree selection.
- Compose the pure Router with the Server behind an App with createApp, route, get, handle, listen, and close.
- Emit the byte-frozen 404 miss path and expose exactly the five public symbols through the barrel.