Implement configuration management in WebUI with API integration for loading and saving configurations

This commit is contained in:
Andy Oknen 2025-08-04 08:30:55 +00:00
parent 19710fbc19
commit ee470d32a7
10 changed files with 1120 additions and 50 deletions

View file

@ -107,6 +107,7 @@ func main() {
}
cfg := config.GenerateConfig()
var configPath string
var err error
switch {
case *ver:
@ -124,6 +125,7 @@ func main() {
}
case *useconffile != "":
configPath = *useconffile
f, err := os.Open(*useconffile)
if err != nil {
panic(err)
@ -206,6 +208,9 @@ func main() {
return
}
// Set current config for web UI
config.SetCurrentConfig(configPath, cfg)
n := &node{}
// Set up the Yggdrasil node itself.