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.
Assets fs.FS
// Index defaults to index.html.
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.