Documentation
¶
Overview ¶
Package web serves embedded single-page applications with optional Go-template index data.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SPA ¶
type SPA struct {
// Assets is rooted at the web distribution directory, unless Index names a subdirectory.
Assets fs.FS
// Index defaults to index.html; its directory also locates public static files.
Index string
// BasePath is the URL mount prefix, for example /motus/.
BasePath string
// TemplateData provides optional extra values for index.html.
TemplateData map[string]any
}
SPA describes a frontend build and its externally mounted base path.
Click to show internal directories.
Click to hide internal directories.