Documentation
¶
Index ¶
Constants ¶
View Source
const ErrFrontendNotIncluded = errors.Sentinel("frontend is not included")
Variables ¶
This section is empty.
Functions ¶
func RegisterFrontend ¶
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 ¶
func (f *FileServerWithCaching) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.