webdist

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package webdist serves the React SPA. In production it is compiled with the `embed_spa` build tag and serves the SPA embedded into the binary; without the tag (local `go run`) it serves a placeholder pointing at the Vite dev server. The static/ directory is gitignored and populated at image-build time.

Index

Constants

View Source
const Embedded = false

Embedded reports whether the SPA is compiled into the binary.

Variables

View Source
var FS fs.FS

FS is nil in dev builds; Handler serves a placeholder instead.

Functions

func Handler

func Handler() http.Handler

Handler serves embedded SPA files with an index.html fallback for client-side routes. /api/* is routed before this handler and never falls through.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL