Documentation
¶
Overview ¶
Package spa serves the embedded admin single-page application: the production Vue build at rest plus the development-mode reverse proxy to the Vite server. Unknown paths fall back to index.html so the SPA router owns client-side navigation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler serves the admin SPA: a dev-mode reverse proxy when enabled, otherwise files from the embedded production build with an index.html fallback for unknown paths.
func NewHandler ¶
NewHandler creates a Handler. adminURL is the Vite dev server target used only when devMode is set.
func (*Handler) ServeAdmin ¶
func (h *Handler) ServeAdmin(w http.ResponseWriter, r *http.Request)
ServeAdmin serves the admin SPA: the dev-server proxy in dev mode, embedded files in production, index.html for anything else.