{"repo":"syntaqx/serve","free":true,"listed":false,"github":"https://github.com/syntaqx/serve","clone":"git clone https://github.com/syntaqx/serve.git","description":"🍽️ a static http server anywhere you need one.","language":"Go","stars":351,"topics":["static-site","simple-http-server","file-server","static-server","http","http-server","cli","command"],"license":"MIT","category":"networking-infra","readme_excerpt":"serve is a static http server anywhere you need one. [git]: https://git-scm.com/ [golang]: https://golang.org/ [releases]: https://github.com/syntaqx/serve/releases [docker-hub]: https://hub.docker.com/r/syntaqx/serve [ ][releases] [ ][docker-hub] TL;DR It's basically python -m SimpleHTTPServer 8080 written in Go, because who can remember that many letters? Features HTTPS (TLS) Configurable CORS support Structured request logging (text or JSON) Graceful shutdown on SIGINT / SIGTERM Health-check endpoint at /healthz for load balancers and container probes Dotfiles ( .env , .git , ...) hidden by default Optional directory-listing control via --dirlisting net/http compatible BasicAuth via a users file (plaintext or bcrypt) Configurable via flags or SERVE environment variables Installation serve can be installed in a handful of ways: Docker The official [syntaqx/serve][docker-hub] image is available on Docker Hub. To get started, try hosting a directory from your docker host: Alternatively, a simple Dockerfile can be used to generate a new image that includes the necessary content: Place this in the same directory as your content, then build and run the container: Exposing an external port Then you can navigate to http://localhost:8080/ or http://host-ip:8080/ in your browser. Using environment variables for configuration [12-factor-config]: https://12factor.net/config Every flag can also be set from an environment variable, following the expectations of a [12factor app][12-facto","default_branch":null,"files":null,"tree":[],"storefront":"/r/syntaqx","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/syntaqx/serve/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}