Fast file serving, zero ceremony

gHTTP

A Go-powered file server that mirrors python -m http.server, adds structured Zap request logging, renders Markdown to HTML, and provisions self-signed HTTPS certificates for local development.

One-liner
docker run -p 8000:8000 -v $(pwd):/data ghcr.io/tyemirov/ghttp:latest --directory /data
HTTP/1.0 + 1.1
Protocol toggle with sane keep-alive tuning
Markdown pages
README.md becomes the directory landing page
Local HTTPS
Self-managed dev CA and SAN-aware certs
Request log (console)
$ ghttp --directory ./public 8000
Serving HTTP on 0.0.0.0 port 8000 (http://localhost:8000/) ...
127.0.0.1 - - [10/Feb/2026 21:32:05] "GET / HTTP/1.1" 200 1837

Prefer machine logs? Switch to JSON with --logging-type JSON.

Built for the stuff you actually do

gHTTP keeps the simplicity of a single command, but adds the pieces you end up re-building on every project anyway.

Drop-in ergonomics

Default port 8000, optional positional port argument, and a single binary that behaves like a good shell tool.

Zap request logging

Human-friendly console logs or structured JSON logs with a flag switch. No ad-hoc fmt.Println debugging.

Markdown as pages

Render *.md as HTML automatically. When a directory contains README.md, it becomes the landing page.

Reverse proxy + WebSockets

Serve static assets and proxy API routes (including WebSocket upgrades) via explicit from=to mappings.

Local HTTPS that feels native

--https provisions a development CA and issues SAN-aware leaf certs on demand for localhost and your extra hosts.

Config everywhere

Flags map to Viper keys, config files live under ~/.config/ghttp, and env vars use GHTTP_*.

Quickstart

Pick your path. Each option keeps the workflow minimal and the defaults predictable.

Docker (recommended)

Serve the current directory at http://localhost:8000.

docker pull ghcr.io/tyemirov/ghttp:latest
docker run -p 8000:8000 -v $(pwd):/data ghcr.io/tyemirov/ghttp:latest --directory /data
Go toolchain

Install the CLI and run it from any directory.

go install github.com/tyemirov/ghttp/cmd/ghttp@latest
ghttp

Go 1.25.4+ is required (matches go.mod).

Binary releases

Download the latest binaries from GitHub Releases.

github.com/tyemirov/ghttp/releases

Common commands
Serve a directory
ghttp --directory /srv/www 9000
Enable local HTTPS
ghttp --https
Proxy an API route
ghttp --proxy /api=http://localhost:8081

Use it like this

gHTTP shines when you want a local server that behaves like a tool, not a framework.

Frontend preview

Serve a static build with clean request logs and Markdown landing pages for docs.

Local HTTPS testing

Exercise secure cookies, service workers, and OAuth redirects without fighting browser warnings.

Static + API in one origin

Keep CORS out of your day: serve assets and proxy your backend from the same host and port.