refactor: enable automatic env parsing
This commit is contained in:
parent
4831b8b68f
commit
670bc9d64c
|
@ -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")
|
||||||
|
|
Loading…
Reference in New Issue