Hacker News new | past | comments | ask | show | jobs | submit login

Caddy is a single file web server as well :) https://caddyserver.com/

Admittedly they solve different usecases, where Redbean seems to want to serve a whole static site as a single file, which isn't currently possible with Caddy, (but you can run `caddy file-server` to serve the current directory as a static site), but it may become possible in the future with Golang's new embed package https://golang.org/pkg/embed/




Caddy is cool but it has a separate 33mb executable for each operating system. Redbean is a 128kb executable that runs on all platforms so it has fewer moving parts and is 1584x tinier. All the convenience of being able to "just add your assets to the zip executable" wouldn't have been feasible if we needed to repeat that process n times for each operating system.


Yes of course - like I said, they solve different usecases. Caddy has way, way more features overall to make up for the bigger binary.


That's actually a pretty interesting idea. I wonder if we could make a lite version of Caddy bundled with your website embedded...no need to mess with file systems or permissions or devices and folders to run a static site. Might need some massaging to become a truly pleasant workflow though.


The go std library offers the embed package. You can just embed your files and use the std lib's webserver and generate a single file binary. No need for Caddy.

All this would be roughly 15 lines of code.


People use Caddy for automatic HTTPS, which the std lib does not give you.


Obviously you don't need to know this but others might not be aware that certmagic is a great middle ground between Caddy and rolling your own ACME.


Yeah - I could see it being part of xcaddy tooling to package up the static assets in the binary :)


Caddy is cool! Redbean is magic :p

Thanks for sharing.


Is that smile at the end of your first sentence meant to be condescending?

You are affiliated with Caddy and ought to mention that when you promote your own software. https://news.ycombinator.com/item?id=16687686

This is not a competition. Caddy is not even in the same realm as Redbean.

Redbean is a multi-platform binary that doubles as a ZIP. It's roughly 1500 times smaller than Caddy too.

> different usecases

Right. :)


> Is that smile at the end of your first sentence meant to be condescending?

What? Of course not! You're reading way too much into that. It's simply enthusiasm. I read about Redbean and it being a single file webserver and the first thing to come to mind is Caddy, as "prior art".

Like I said, different usecases; Caddy is a general purpose webserver which has automatic certificate management, H2/H3 support, reverse proxy, file server, a strong plugin system, the list goes on. Of course it'll be bigger in size. Redbean is super cool and does have the advantage in file size and portability, clearly, but it is essentially a single-purpose tool. And there's nothing wrong with that.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: