Renamed api host to dashboard host env variable
This commit is contained in:
@@ -5,11 +5,11 @@ import (
|
||||
)
|
||||
|
||||
type EnvConfig struct {
|
||||
Port string
|
||||
ConfigDir string
|
||||
GithubPat string
|
||||
StoragePath string
|
||||
ApiHost string
|
||||
Port string
|
||||
ConfigDir string
|
||||
GithubPat string
|
||||
StoragePath string
|
||||
DashboardHost string
|
||||
}
|
||||
|
||||
func Load() EnvConfig {
|
||||
@@ -33,16 +33,16 @@ func Load() EnvConfig {
|
||||
storagePath = "./storage"
|
||||
}
|
||||
|
||||
apiHost := os.Getenv("API_HOST")
|
||||
if apiHost == "" {
|
||||
apiHost = "localhost"
|
||||
dashboardHost := os.Getenv("DASHBOARD_HOST")
|
||||
if dashboardHost == "" {
|
||||
dashboardHost = "localhost"
|
||||
}
|
||||
|
||||
return EnvConfig{
|
||||
Port: port,
|
||||
ConfigDir: configDir,
|
||||
GithubPat: githubPat,
|
||||
StoragePath: storagePath,
|
||||
ApiHost: apiHost,
|
||||
Port: port,
|
||||
ConfigDir: configDir,
|
||||
GithubPat: githubPat,
|
||||
StoragePath: storagePath,
|
||||
DashboardHost: dashboardHost,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user