You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
429 B

4 months ago
package main
import (
4 months ago
"ginCms/handelers"
"ginCms/utils"
"github.com/spf13/viper"
4 months ago
)
func main() {
4 months ago
//解析配置
utils.ParseConfig()
4 months ago
//设置模式
4 months ago
utils.SetMode()
4 months ago
//设置日志
utils.SetLogger()
4 months ago
//初始化路由引擎
r := handelers.InitEngine()
4 months ago
utils.Logger().Info("server is listening on ", "addr", viper.GetString("app.addr"))
4 months ago
r.Run(viper.GetString("app.addr")) // 监听并在 0.0.0.0:8080 上启动服务
4 months ago
}