Set host and port defaults in config
This commit is contained in:
parent
eda9453e2c
commit
26a51bc95f
@ -36,6 +36,11 @@ var (
|
||||
CheckAliasURL string
|
||||
)
|
||||
|
||||
const (
|
||||
defaultHTTPHost string = "127.0.0.1"
|
||||
defaultHTTPPort uint = 7123
|
||||
)
|
||||
|
||||
func setBase() error {
|
||||
var err error
|
||||
|
||||
@ -71,3 +76,11 @@ func LoadConfig() error {
|
||||
CheckAliasURL, _ = url.JoinPath(dataURLBase, AliasPrefix)
|
||||
return nil
|
||||
}
|
||||
|
||||
func Host() string {
|
||||
return env.GetEnv("HOST", defaultHTTPHost)
|
||||
}
|
||||
|
||||
func Port() uint {
|
||||
return env.GetEnvUint("PORT", defaultHTTPPort)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user