Skip to content

Lightweight zero-configuration SPA HTTP server. Serves SPA bundle on HTTP port so it plays well with Traefik out of the box. Compatible with Vue.js, React and Angular

License

Notifications You must be signed in to change notification settings

devforth/spa-to-http

Repository files navigation

Coverage Badge Coverage Badge

spa-to-http

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.

Quick Start

# Serve ./dist at http://localhost:8080
docker run --rm -p 8080:8080 -v $(pwd)/dist:/code devforth/spa-to-http:latest

For local (non-Docker) runs, see Local Run (Console).

Key Features

  • 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)

Example

# 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

Documentation

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

License

MIT

About

Lightweight zero-configuration SPA HTTP server. Serves SPA bundle on HTTP port so it plays well with Traefik out of the box. Compatible with Vue.js, React and Angular

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages