Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
markalbrand56 committed Oct 8, 2024
1 parent 54ca17f commit 68c63b0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions backend/configs/envs.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ func loadSystemEnv() (map[string]string, error) {
envs["PG_PASSWORD"] = os.Getenv("PG_PASSWORD")
envs["PG_RDS_HOST"] = os.Getenv("PG_RDS_HOST")
envs["PG_RDS_PORT"] = os.Getenv("PG_RDS_PORT")
envs["PG_DATABASE"] = os.Getenv("PG_DATABASE")
envs["DATABASE_ENDPOINT"] = os.Getenv("DATABASE_ENDPOINT")

if envs["PG_USER"] == "" {
return envs, errors.New("PG_USER is not set")
Expand All @@ -57,6 +59,12 @@ func loadSystemEnv() (map[string]string, error) {
if envs["PG_RDS_PORT"] == "" {
return envs, errors.New("PG_RDS_PORT is not set")
}
if envs["PG_DATABASE"] == "" {
return envs, errors.New("PG_DATABASE is not set")
}
if envs["DATABASE_ENDPOINT"] == "" {
return envs, errors.New("DATABASE_ENDPOINT is not set")
}

return envs, nil
}

0 comments on commit 68c63b0

Please sign in to comment.