diff --git a/backend/.env b/backend/.env deleted file mode 100644 index 6be6a33..0000000 --- a/backend/.env +++ /dev/null @@ -1,13 +0,0 @@ -DB_HOST=localhost -DB_PORT=3306 -DB_USER=mailadmin -DB_PASSWORD=your-db-password -DB_NAME=mailserver -JWT_SECRET=change-this-secret-in-production - -SMTP_HOST=localhost -SMTP_PORT=587 -SMTP_USER= -SMTP_PASSWORD= -SMTP_FROM=noreply@localhost -BASE_URL=http://localhost:8080 diff --git a/backend/internal/config/config.go b/backend/internal/config/config.go index d02ab0f..fca5c25 100644 --- a/backend/internal/config/config.go +++ b/backend/internal/config/config.go @@ -62,12 +62,7 @@ func Load() *Config { // Load .env file if it exists. // This is for local development convenience. // In production, use environment variables directly. - // Try multiple locations: current dir, backend/.env, ../backend/.env - if err := godotenv.Load(".env"); err != nil { - if err := godotenv.Load("backend/.env"); err != nil { - godotenv.Load("../backend/.env") - } - } + godotenv.Load(".env") // Return a new Config struct with all values. // getEnv(key, default) returns the environment variable value,