Consolidate to single .env file in project root
This commit is contained in:
parent
b76ea568ae
commit
f48d5631e7
2 changed files with 1 additions and 19 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue