serve
static-server
serve | static-server | |
---|---|---|
2 | 3 | |
146 | 174 | |
- | - | |
0.0 | 7.5 | |
about 1 year ago | 8 months ago | |
Go | Go | |
Mozilla Public License 2.0 | The Unlicense |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
serve
-
static-server: an HTTP server in Go for static content
There are many projects doing the exact same thing. Here's one approach from myself, but haven't updated since 2019:
https://github.com/philippgille/serve
One difference is that it can create a TLS cert for you, instead of having to supply one via CLI arg.
I don't recommend using it in its current form though due to its (the compiled binaries') Go version being outdated.
-
Python3 http server
Not related to python, I use serve command available as snap and can be run inside any directory https://github.com/philippgille/serve/
static-server
-
static-server: an HTTP server in Go for static content
Indeed, the actual heavy lifting is done by the Go standard library; this line (https://github.com/eliben/static-server/blob/main/internal/s...) is where the real magic happens (ignoring the logging middleware):
fileHandler := serveLogger(serveLog, http.FileServer(http.Dir(rootDir)))
What are some alternatives?
Caddy - Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS
kawipiko - kawipiko -- blazingly fast static HTTP server -- focused on low latency and high concurrency, by leveraging Go, `fasthttp` and the CDB embedded database
webby - A tiny static webserver app written in go
caddy-ext - Various Caddy v2 extensions (a.k.a. modules).
go-cloud - The Go Cloud Development Kit (Go CDK): A library and tools for open cloud development in Go.
gock - HTTP traffic mocking and testing made easy in Go ༼ʘ̚ل͜ʘ̚༽
statiks - Fast, zero-configuration, static HTTP filer server.