init App Config
()
| 421 | |
| 422 | // init App Config |
| 423 | func (app *DotWeb) initAppConfig() { |
| 424 | config := app.Config |
| 425 | // log config |
| 426 | if config.App.LogPath != "" { |
| 427 | app.SetLogPath(config.App.LogPath) |
| 428 | } |
| 429 | app.SetEnabledLog(config.App.EnabledLog) |
| 430 | |
| 431 | // run mode config |
| 432 | if app.Config.App.RunMode != RunMode_Development && app.Config.App.RunMode != RunMode_Production { |
| 433 | app.Config.App.RunMode = RunMode_Development |
| 434 | } |
| 435 | |
| 436 | app.HttpServer.initConfig(app.Config) |
| 437 | |
| 438 | // detailed request metrics |
| 439 | if config.Server.EnabledDetailRequestData { |
| 440 | app.StateInfo().EnabledDetailRequestData = config.Server.EnabledDetailRequestData |
| 441 | } |
| 442 | } |
| 443 | |
| 444 | // init register config's Middleware |
| 445 | func (app *DotWeb) initRegisterConfigMiddleware() { |
no test coverage detected