Documentation
¶
Overview ¶
Package watchfs is a ServerController that serves templates from a local directory and reloads when watched paths change. JSON type: "watchfs".
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
// Path is the templates directory. Default "templates".
Path string `json:"path,omitempty" arg:"-t,--template-dir,--templates-dir" default:"templates"`
// WatchDirs lists extra directories to watch (in addition to Path).
WatchDirs []string `json:"watch_dirs,omitempty" arg:"--watch,separate"`
// Debounce is the fs event debounce interval. Default 200ms.
Debounce xtemplate.Duration `json:"debounce,omitempty" arg:"--debounce"`
// contains filtered or unexported fields
}
Controller watches Path (and optional WatchDirs) and reloads on change.
Click to show internal directories.
Click to hide internal directories.