mirror of
https://github.com/muety/wakapi.git
synced 2023-08-10 21:12:56 +03:00
Resolve #11.
This commit is contained in:
2
main.go
2
main.go
@@ -31,6 +31,7 @@ func readConfig() *models.Config {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
env, _ := os.LookupEnv("ENV")
|
||||
dbUser, valid := os.LookupEnv("WAKAPI_DB_USER")
|
||||
dbPassword, valid := os.LookupEnv("WAKAPI_DB_PASSWORD")
|
||||
dbHost, valid := os.LookupEnv("WAKAPI_DB_HOST")
|
||||
@@ -62,6 +63,7 @@ func readConfig() *models.Config {
|
||||
}
|
||||
|
||||
return &models.Config{
|
||||
Env: env,
|
||||
Port: port,
|
||||
Addr: addr,
|
||||
DbHost: dbHost,
|
||||
|
||||
Reference in New Issue
Block a user