Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 1.08 KB

File metadata and controls

34 lines (24 loc) · 1.08 KB

← Deployment · Development · Back to README

Architecture

spa-to-http is a single Go binary focused on static file serving for SPA bundles. It keeps the runtime simple, with a small number of packages and minimal configuration.

Project Structure

./src
./src/main.go   # Entry point and wiring
./src/app       # HTTP server and handlers
./src/param     # CLI and environment parsing
./src/util      # Small shared helpers

Request Flow

  1. Parse configuration (CLI and environment variables).
  2. Initialize the HTTP server and middleware.
  3. Serve static files from the configured directory.
  4. Apply caching headers optimized for SPA assets.
  5. Optionally serve compressed files (Brotli/Gzip) when enabled.

Design Goals

  • Fast startup and low memory footprint
  • Predictable caching for hashed assets and index.html
  • Simple configuration for containerized use

See Also