review

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PublicFS, _ = fs.Sub(embeddedFS, "embed/public")

PublicFS is the SPA filesystem rooted at embed/public/. Vite builds to dist/ and cmd/build-web copies it to embed/public/.

Functions

func NewSPAHandler

func NewSPAHandler(opts *SPAOptions) (http.Handler, error)

NewSPAHandler returns an HTTP handler that serves the embedded frontend with SPA fallback to index.html for unknown paths.

Types

type SPAOptions

type SPAOptions struct {
	// APIPrefix is the URL prefix for API routes that should NOT be served by the SPA.
	APIPrefix string
	// ArtifactPrefix is the URL prefix for artifact file serving.
	ArtifactPrefix string
}

SPAOptions configures the SPA handler behaviour.

Jump to

Keyboard shortcuts

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