Interesting. I find that I frequently need more than this minimum. For example, I often need to set headers, e.g. to set cookies.
That makes sense, yes. There should be a cookie-jar argument.
Also, I'm not a big fan of using regular expressions and string interpolation as the only means of path rewriting. Perhaps SRFI 115 regular expressions would be Schemely enough.
I meant SRFI 115 regex objects, that is, the output of the regex procedure or the rx macro.
And serving only static files and JSON is certainly an opinionated choice. It doesn't leave much room for design choice, e.g. server-side rendering of HTML updates — at least not without unnecessary JSON overhead.
What did you have in mind when you wrote this? Are you thinking of turning it into a SRFI, or experimenting with some apps written this way, or something else?
I just got to thinking about how over-powered web servers and application servers are, compared to what they get used for. At the last several jobs, the design has been like this: There's a big page of HTML that gets loaded at or just after login time. That brings in a bunch of JS via style elements, and the JS program then runs as the whole application until it needs to either load some new HTML fragment or consult the back end, which is done through JSON APIs. The WP article <https://en.wikipedia.org/wiki/Single-page_application
> is a pretty good explanation of what, how, and why or why not.
It's a whole new world. Of course the old world is still very much there. No reason for servers to be one-size-fits-all.