diff --git a/config/config.go b/config/config.go index cb94946..77df2b0 100644 --- a/config/config.go +++ b/config/config.go @@ -137,7 +137,9 @@ func LoadConfig(customPath string) *Config { // applyDefaults fills zero-value fields with sensible defaults. func applyDefaults(cfg *Config, defaultPath string) *Config { - if cfg.Web.Port == "" { + // If the entire web block is empty (old config without "web" key), + // fill default port so the app still starts on 8080. + if cfg.Web.Port == "" && cfg.Web.Socket == "" { cfg.Web.Port = defaultPort } if cfg.Database.Type == "" {