Start start app server with set config If an exception occurs, will be return it if no set Server.Port, will be use DefaultHttpPort
()
| 358 | // If an exception occurs, will be return it |
| 359 | // if no set Server.Port, will be use DefaultHttpPort |
| 360 | func (app *DotWeb) Start() error { |
| 361 | if app.Config == nil { |
| 362 | return errors.New("no config exists") |
| 363 | } |
| 364 | // start server |
| 365 | port := app.Config.Server.Port |
| 366 | if port <= 0 { |
| 367 | port = DefaultHTTPPort |
| 368 | } |
| 369 | return app.StartServer(port) |
| 370 | } |
| 371 | |
| 372 | // MustStart start app server with set config |
| 373 | // If an exception occurs, will be panic it |
no test coverage detected