Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Mode Mode // Server mode: static or proxy
Directory string // Directory to serve (static mode)
ProxyURL string // Backend URL to proxy (proxy mode)
Port int // Server port (0 = auto-detect)
Host string // Bind host ("localhost" or "0.0.0.0")
WatchPaths []string // Paths to watch for changes
IgnorePaths []string // Glob patterns to ignore
OnReload func() // Callback when files change (triggers reload)
Debug bool // Enable debug logging
}
Config holds server configuration.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a development web server with hot reload capabilities.
type Watcher ¶
type Watcher struct {
// contains filtered or unexported fields
}
Watcher watches files for changes and triggers callbacks.
func NewWatcher ¶
func NewWatcher(cfg WatcherConfig) (*Watcher, error)
NewWatcher creates a new file watcher.
Click to show internal directories.
Click to hide internal directories.