代码优化

This commit is contained in:
meilin.huang
2021-04-21 10:22:09 +08:00
parent ec1001d88b
commit d5fc1b6f52
14 changed files with 64 additions and 226 deletions

View File

@@ -0,0 +1,17 @@
package starter
import (
"mayfly-go/base/global"
"github.com/gin-gonic/gin"
)
func RunWebServer(web *gin.Engine) {
port := global.Config.Server.GetPort()
if app := global.Config.App; app != nil {
global.Log.Infof("%s- Listening and serving HTTP on %s", app.GetAppInfo(), port)
} else {
global.Log.Infof("Listening and serving HTTP on %s", port)
}
web.Run(port)
}