Commit 28011a58 authored by astaxie's avatar astaxie

fix #2462

parent 9266ece7
......@@ -254,6 +254,9 @@ func parseConfig(appConfigPath string) (err error) {
}
func assignConfig(ac config.Configer) error {
for _, i := range []interface{}{&BConfig.Listen, &BConfig.WebConfig, &BConfig.Log, &BConfig.WebConfig.Session} {
assignSingleConfig(i, ac)
}
// set the run mode first
if envRunMode := os.Getenv("BEEGO_RUNMODE"); envRunMode != "" {
BConfig.RunMode = envRunMode
......@@ -261,10 +264,6 @@ func assignConfig(ac config.Configer) error {
BConfig.RunMode = runMode
}
for _, i := range []interface{}{BConfig, &BConfig.Listen, &BConfig.WebConfig, &BConfig.Log, &BConfig.WebConfig.Session} {
assignSingleConfig(i, ac)
}
if sd := ac.String("StaticDir"); sd != "" {
BConfig.WebConfig.StaticDir = map[string]string{}
sds := strings.Fields(sd)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment