World's fastest lightweight zero-configuration SPA HTTP server.
Serve a built SPA bundle over HTTP with sensible defaults for caching and optional Brotli/Gzip compression. It’s designed to run cleanly in Docker and behind reverse proxies like Traefik or Cloudflare.
# Serve ./dist at http://localhost:8080
docker run --rm -p 8080:8080 -v $(pwd)/dist:/code devforth/spa-to-http:latestFor local (non-Docker) runs, see Local Run (Console).
- Zero-configuration Docker setup for common SPA outputs
- Small image and fast startup (Go binary)
- Optional Brotli/Gzip compression
- Cache-control optimized for hashed assets and index.html
- Works with popular SPA toolchains (React, Vue, Angular, Svelte, Vite, Webpack)
# Enable Brotli and serve on a custom port
docker run --rm -p 8082:8082 -v $(pwd)/dist:/code devforth/spa-to-http:latest --brotli --port 8082| Guide | Description |
|---|---|
| Getting Started | Install, build, and run |
| Configuration | Environment variables and CLI flags |
| Deployment | Docker and reverse proxy setup |
| Architecture | Project structure and request flow |
| Benchmarks | spa-to-http vs Nginx |
MIT