4 ms·
It's not actually a single binary. It's a single binary working with the filesystem. All content is on the filesystem. The "single binary" is a lightweight g
by tetsuhamu 3y ago
It's not actually a single binary.
It's a single binary working with the filesystem.
All content is on the filesystem.
The "single binary" is a lightweight golang webserver that serves content from the filesystem.
- dsQTbR7Y5mRHnZv 3y agoNo it isn't. You can try compiling from source and running it yourself: https://git.j3s.sh/j3s.sh/tree/c4517e8484a68c734d2f17c17c5468bfe09f0577/ https://git.j3s.sh/j3s.sh/tree/c4517e8484a68c734d2f17c17c546...
- shhsshs 3y agoThe code uses `//go:embed` which actually embeds a fake filesystem into the binary. It’s really easy to miss that part, but it truly is one single binary, despite seeming to reference files by paths.
- tetsuhamu 3y agoOh dang, that's neat! Thank you!