Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hooks ¶
type Hooks interface {
RegisterRoutes(mux *http.ServeMux)
OnServerStarted(addr string) error
OnRoutesAssigned(graph *content.SiteGraph) error
OnAssetsBuilding(*config.Config) error
}
Hooks exposes the preview-server lifecycle to integrators.
The practical order is:
- OnRoutesAssigned during rebuild
- RegisterRoutes when the mux is assembled
- OnAssetsBuilding during asset sync
- OnServerStarted after the listener is ready
type Option ¶
type Option func(*Server)
Option mutates preview-server construction behavior.
func WithDebugMode ¶
WithDebugMode enables additional debug logging and request instrumentation for the preview server.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server serves Foundry preview output, rebuilds on change, and exposes preview routes such as live reload and diagnostics.
Click to show internal directories.
Click to hide internal directories.