envs added
This commit is contained in:
parent
f56a39d065
commit
524f77b7e5
2 changed files with 7 additions and 1 deletions
|
|
@ -10,11 +10,13 @@ type Config struct {
|
|||
|
||||
type App struct {
|
||||
LogLvl string
|
||||
Mode string
|
||||
}
|
||||
|
||||
type Http struct {
|
||||
Host string
|
||||
Port string
|
||||
Prefix string
|
||||
GinMode string
|
||||
}
|
||||
|
||||
|
|
@ -28,11 +30,13 @@ func NewConfig() Config {
|
|||
return Config{
|
||||
App: App{
|
||||
LogLvl: getEnv("APP_LOG_LVL", "debug"),
|
||||
Mode: getEnv("APP_MODE", "dev"),
|
||||
},
|
||||
|
||||
Http: Http{
|
||||
Host: getEnv("HTTP_HOST", "0.0.0.0"),
|
||||
Port: getEnv("HTTP_PORT", "41082"),
|
||||
Port: getEnv("HTTP_PORT", "41083"),
|
||||
Prefix: getEnv("HTTP_PREFIX", "/api/v2"),
|
||||
GinMode: getEnv("GIN_MODE", "dev"),
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue