Fix #261 add variable HTTP_CONTROL_SERVER_PORT
This commit is contained in:
13
internal/params/server.go
Normal file
13
internal/params/server.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package params
|
||||
|
||||
import (
|
||||
libparams "github.com/qdm12/golibs/params"
|
||||
)
|
||||
|
||||
func (r *reader) GetControlServerPort() (port uint16, err error) {
|
||||
n, err := r.envParams.GetEnvIntRange("HTTP_CONTROL_SERVER_PORT", 1, 65535, libparams.Default("8000"))
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return uint16(n), nil
|
||||
}
|
||||
Reference in New Issue
Block a user