3 ms·
"caddy file-server"[1] and sirv-cli[2] should have you covered, but in case you're looking for something more niche and less powerful, you could look at busybox
by supriyo-biswas 3y ago
"caddy file-server"[1] and sirv-cli[2] should have you covered, but in case you're looking for something more niche and less powerful, you could look at busybox httpd[3].
I wrote something similar long ago in < 400 lines of Go (with most of it being templates and mimetype information) that just supports GET, HEAD and gzip, in case you're interested[4].
[1] https://caddyserver.com/docs/quick-starts/static-files https://caddyserver.com/docs/quick-starts/static-files
[2] https://www.npmjs.com/package/sirv-cli https://www.npmjs.com/package/sirv-cli
[3] https://openwrt.org/docs/guide-user/services/webserver/http.httpd https://openwrt.org/docs/guide-user/services/webserver/http....
[4] https://github.com/supriyo-biswas/gohttpd https://github.com/supriyo-biswas/gohttpd
- qwerty456127 3y agoThanks, I'll take a look. I also care about it being reasonably secure so I don't write it myself (I'm far from a pro in avoiding vulnerabilities) and also prefer to decrease the attack surface by giving up all non-essential features. gzip is unnecessary because 99% of the traffic I would serve is going to be pre-compressed (like zip and jpeg files).