static file server
  • Go 81.7%
  • Makefile 18.3%
Find a file
2025-12-31 20:34:31 -08:00
cmd/static-server update deps 2025-12-16 17:29:25 -08:00
man update deps 2025-12-16 17:29:25 -08:00
tools makefile cleanups and improvements 2025-01-21 13:01:57 -08:00
.gitignore makefile cleanups and improvements 2025-01-21 13:01:57 -08:00
DEPS.md update deps 2025-12-16 17:29:25 -08:00
go.mod bump deps 2025-12-31 20:34:31 -08:00
go.sum bump deps 2025-12-31 20:34:31 -08:00
LICENSE.md update license 2019-04-30 23:21:11 -07:00
Makefile makefile cleanups and improvements 2025-01-21 13:01:57 -08:00
README.md update deps 2025-12-16 17:29:25 -08:00

static-server

About

The static-server utility is useful for testing. It serves the contents of a given directory over http.

Install

go install codeberg.org/dropwhile/static-server/cmd/static-server@latest

Usage

Usage:
  static-server [OPTIONS]

Application Options:
      --indexes=     comma separated (ordered) list of index files (default: index.html)
      --readmes=     comma separated (ordered) list of readme files to auto append to dir listings
      --headers=     comma separated (ordered) list of header files to auto prepend to dir listings
  -t, --template=    template file to use for directory listings
  -r, --root=        Root directory to server from (default: .)
      --no-log-ts    Do not add a timestamp to logging
      --log-json     Log messages in json format
      --log-struct   Log messages in structured text format
  -l, --listen=      Address:Port to bind to for HTTP (default: 0.0.0.0:8000)
      --ssl-listen=  Address:Port to bind to for HTTPS/SSL/TLS
      --ssl-key=     ssl private key (key.pem) path
      --ssl-cert=    ssl cert (cert.pem) path
  -x, --no-indexing  disable directory indexing
  -v, --verbose      Show verbose (debug) log level output
  -V, --version      Print version and exit; specify twice to show license information

Help Options:
  -h, --help         Show this help message

License

Released under the ISC license . See LICENSE.md file for details.