feat: add devmode flag; introduce live reload support; update examples

This commit is contained in:
Joao Goncalves
2025-11-11 00:14:13 -01:00
parent a0d672cabe
commit 03ce9808e6
14 changed files with 161 additions and 109 deletions

View File

@@ -9,10 +9,17 @@ const (
LogLevelDebug
)
// Plugin is a func that can mutate the given *via.V app runtime. It is useful to integrate popular JS/CSS UI libraries or tools.
type Plugin func(v *V)
// Config defines configuration options for the via application
type Options struct {
// The development mode flag. If true, enables server and browser auto-reload on `.go` file changes.
DevMode bool
// The http server address. e.g. ':3000'
ServerAddress string
// Level of the logs to write to stdout.
// Options: Error, Warn, Info, Debug.
LogLvl LogLevel