(incomplete) change password feature
This commit is contained in:
parent
5531ef6bab
commit
0052c470f9
8 changed files with 76 additions and 25 deletions
|
@ -19,6 +19,7 @@ func GetConfig() model.Config {
|
|||
|
||||
config := model.Config{
|
||||
BaseUrl: "https://arimelody.me",
|
||||
Host: "0.0.0.0",
|
||||
Port: 8080,
|
||||
DB: model.DBConfig{
|
||||
Host: "127.0.0.1",
|
||||
|
@ -55,6 +56,7 @@ func handleConfigOverrides(config *model.Config) error {
|
|||
var err error
|
||||
|
||||
if env, has := os.LookupEnv("ARIMELODY_BASE_URL"); has { config.BaseUrl = env }
|
||||
if env, has := os.LookupEnv("ARIMELODY_HOST"); has { config.Host = env }
|
||||
if env, has := os.LookupEnv("ARIMELODY_PORT"); has {
|
||||
config.Port, err = strconv.ParseInt(env, 10, 0)
|
||||
if err != nil { return errors.New("ARIMELODY_PORT: " + err.Error()) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue