Comment by ๐Ÿš€ stack

Re: "Custom servers with Fornax"

In: s/Fornax

I like your code, but I will probably not do that.

The goal of this project is a minimalistic drop-in server with a minimal footprint.

I don't really like the idea of supporting CGI variants or a complex routing mechanism for different directories. I'd rather run multiple application servers on different ports if I must.

And besides, so many other servers do that already (with various degrees of success, as I found out the hard way).

But there is nothing stopping someone else from adding a routing and configuration mechanism to Fornax.

๐Ÿš€ stack [OP/mod]

2025-09-15 ยท 8 months ago

Original Post

๐ŸŒ’ s/Fornax

๐Ÿš€ stack: [mod]

Custom servers with Fornax โ€” I've done a little organizing to make it easier to customize the server. At the bottom, there is a definition of a function called 'serve_url()'. Here is where the magic happens: you get a url, and you output something. The default definition just serves files: [preformatted] But you can do anything else here. For instance, if you want to show current time when the url is '/time', do this: [preformatted] [preformatted] See it in action here: [gemini link] See the...

๐Ÿ’ฌ 2 comments ยท 2025-09-14 ยท 8 months ago