Hacker News new | ask | show | jobs
by binwiederhier 1450 days ago
embed.FS is really cool. If you wanna see what it looks like, check out how I build ntfy [0]. It ships with the docs (built from mkdocs, see [1]) and the React web app [2] all in a single binary.

Here are the embed statements [3]. One thing to note is that embed.FS does not send 304 Not Modified status back, which is why I made a CachingEmbedFS [4].

[0] https://github.com/binwiederhier/ntfy/blob/main/Makefile#L77

[1] https://ntfy.sh/docs/

[2] https://ntfy.sh/app

[3] https://github.com/binwiederhier/ntfy/blob/main/server/serve...

[4] https://github.com/binwiederhier/ntfy/blob/main/util/embedfs...