frontend

package
v2.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ErrFrontendNotIncluded = errors.Sentinel("frontend is not included")

Variables

This section is empty.

Functions

func RegisterFrontend

func RegisterFrontend(e *echo.Echo) error

RegisterFrontend mounts the embedded SPA as the Echo not-found fallback: any path no API/WS route matched serves a real file when it exists and falls back to index.html otherwise (preserving SvelteKit client-side routing). Unknown /api paths are handled by the API group's own RouteNotFound handler and never reach this route.

Types

type FileServerWithCaching

type FileServerWithCaching struct {
	// contains filtered or unexported fields
}

func NewFileServerWithCaching

func NewFileServerWithCaching(root http.FileSystem, maxAge int) *FileServerWithCaching

func (*FileServerWithCaching) ServeHTTP

Jump to

Keyboard shortcuts

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