refactor: enable automatic env parsing

This commit is contained in:
Derrick Hammer 2023-06-06 16:35:58 -04:00
parent 4831b8b68f
commit 670bc9d64c
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 0 deletions

View File

@ -15,6 +15,7 @@ func Init() {
viper.AddConfigPath("$HOME/.lumeweb/portal/") viper.AddConfigPath("$HOME/.lumeweb/portal/")
viper.AddConfigPath(".") viper.AddConfigPath(".")
viper.SetEnvPrefix("LUME_WEB_PORTAL") viper.SetEnvPrefix("LUME_WEB_PORTAL")
viper.AutomaticEnv()
pflag.String("database.type", "sqlite", "Database type") pflag.String("database.type", "sqlite", "Database type")
pflag.String("database.host", "localhost", "Database host") pflag.String("database.host", "localhost", "Database host")