diff options
Diffstat (limited to 'backend/config.go')
| -rw-r--r-- | backend/config.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/backend/config.go b/backend/config.go index c083542..99a6d54 100644 --- a/backend/config.go +++ b/backend/config.go @@ -11,6 +11,7 @@ type Config struct { dbUser string dbPassword string dbName string + isLocal bool } func NewConfigFromEnv() (*Config, error) { @@ -34,11 +35,14 @@ func NewConfigFromEnv() (*Config, error) { if !exists { return nil, fmt.Errorf("ALBATROSS_DB_NAME not set") } + isLocalStr, exists := os.LookupEnv("ALBATROSS_IS_LOCAL") + isLocal := exists && isLocalStr == "1" return &Config{ dbHost: dbHost, dbPort: dbPort, dbUser: dbUser, dbPassword: dbPassword, dbName: dbName, + isLocal: isLocal, }, nil } |
