Comment by mholt

5 years ago

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.