top | item 37973167

(no title)

r00tbeer | 2 years ago

I think that URL gets served by the same single binary. Might look like multiple files and connections to you ...

discuss

order

chefandy|2 years ago

Maybe. Seems odd that they'd use a vestigial 'static' directory in the request path, though. I didn't read it because the layout makes it useless on mobile browsers, but I have a feeling they mean that the whole site is coded into one binary like a self-contained ssg rather than the site only requiring one file to work.

piperswe|2 years ago

The static files are probably a directory embedded into the binary with Go's embed package, and mounted on /static.

teddyh|2 years ago

But why? Why not serve all needed content inline?

Aeolun|2 years ago

Because that means every page request downloads all the static content. It’s generally nice for people if they only have to download the shared assets once.

manx|2 years ago

Sometimes browser caching and ease of development is the reason here.