really nice.
if I had any suggestions at all though it would be to have the 404 route actually return the 404 header (or have a way to specify headers with routes), and also have it handle https.
if I had any suggestions at all though it would be to have the 404 route actually return the 404 header (or have a way to specify headers with routes), and also have it handle https.
Probably, all a bare minimum viable url router should do is display some content based on a url or fail to an error code. I would post my own experiments with building a url router that deals with everything (because I tried it) but the end results were objectively worse than what's already been posted here... i've found that it helps to have the router, and whatever process handles rendering the document as a whole (including headers and caching) be completely separate.