frontend

package
v1.19.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFrontendNotIncluded = errors.New("frontend is not included")

Functions

func RegisterFrontend

func RegisterFrontend(e *echo.Echo) error

RegisterFrontend mounts the embedded SPA on the Echo instance and configures a custom HTTP error handler that intercepts 404s to serve the SPA index (preserving SvelteKit client-side routing) while keeping /api/* 404s as JSON.

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