feat: implement comprehensive configuration validation and integrate into store loading and server initialization.

This commit is contained in:
CJACK
2026-04-05 21:18:51 +08:00
parent 585d35e592
commit a28c9fb67f
11 changed files with 299 additions and 60 deletions

View File

@@ -24,7 +24,11 @@ func main() {
config.RefreshLogger()
webui.EnsureBuiltOnStartup()
_ = auth.AdminKey()
app := server.NewApp()
app, err := server.NewApp()
if err != nil {
config.Logger.Error("server initialization failed", "error", err)
os.Exit(1)
}
port := strings.TrimSpace(os.Getenv("PORT"))
if port == "" {
port = "5001"