|
|
package main
|
|
|
|
|
|
import (
|
|
|
"fmt"
|
|
|
"github.com/astaxie/beego"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/gocomm/config"
|
|
|
"gitlab.fjmaimaimai.com/mmm-go/gocomm/pkg/log"
|
|
|
"openapi/internal/utils"
|
|
|
_ "openapi/routers"
|
|
|
"time"
|
|
|
)
|
|
|
|
|
|
func init() {
|
|
|
time.Local = time.FixedZone("CST", 3600*8)
|
|
|
log.InitLog(config.Logger{
|
|
|
Filename: beego.AppConfig.String("aliyun_logs_access"),
|
|
|
Level: fmt.Sprintf("%v", utils.ResolveLogLevel(beego.AppConfig.String("log_level"))),
|
|
|
})
|
|
|
}
|
|
|
|
|
|
func main() {
|
|
|
defer func() {
|
|
|
log.Info("app on stop!")
|
|
|
log.Info("open-api on stop!")
|
|
|
}()
|
|
|
log.Info("app on start!")
|
|
|
|
|
|
log.Info("open-api on start!")
|
|
|
log.Info("Beego Run Mode:", beego.BConfig.RunMode)
|
|
|
|
|
|
beego.Run()
|
...
|
...
|
|