From 6432d4cb002b2d239446a58c5f1923846d0c740b Mon Sep 17 00:00:00 2001 From: John O'Keefe Date: Fri, 30 Jan 2026 20:16:25 -0500 Subject: [PATCH] Fix BaseURL construction to use consistent port - Use SERVER_PORT for both port and BaseURL construction - Ensures BaseURL matches the actual server port --- internal/config/config.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/config/config.go b/internal/config/config.go index c68cd54..b63128c 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -22,9 +22,10 @@ type Config struct { } func LoadConfig() *Config { + port := getEnv("SERVER_PORT", "8765") return &Config{ - ServerPort: getEnv("SERVER_PORT", "8080"), - BaseURL: getEnv("BASE_URL", "http://localhost:8080"), + ServerPort: port, + BaseURL: getEnv("BASE_URL", "http://localhost:"+port), DatabaseHost: getEnv("DATABASE_HOST", "localhost"), DatabasePort: getEnv("DATABASE_PORT", "5432"), DatabaseUser: getEnv("DATABASE_USER", "postgres"),