123456789101112131415161718192021222324252627 |
- package main
- import (
- "fmt"
- "github.com/fvbock/endless"
- "github.com/gin-gonic/gin"
- "github.com/product-definition/conf"
- "github.com/product-definition/helpers"
- "github.com/product-definition/router"
- "github.com/product-definition/utils"
- )
- func main() {
- r := gin.New()
- //启动配置
- utils.Bootstrap(r, utils.BootstrapConf{LogLevel: conf.Conf.LogLevel})
- //设置日志级别
- //level, err := logrus.ParseLevel(conf.Conf.LogLevel)
- //if err != nil {
- // level = logrus.DebugLevel
- //}
- //logrus.SetLevel(level)
- helpers.InitMysql()
- router.Http(r)
- fmt.Println("hello world")
- endless.ListenAndServe(":80", r)
- }
|