1 Star 0 Fork 200

liujie8023/beego-vue-admin

forked from guchengwuyue/yshop-gin 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.go 1.08 KB
一键复制 编辑 原始数据 按行查看 历史
guchengwuyue 提交于 2021-11-16 16:43 . yshop-gin v1.0
package main
import (
"fmt"
"github.com/gin-gonic/gin"
"log"
"net/http"
"yixiang.co/go-mall/app/models"
"yixiang.co/go-mall/pkg/jwt"
"yixiang.co/go-mall/pkg/logging"
"yixiang.co/go-mall/pkg/redis"
"yixiang.co/go-mall/pkg/setting"
"yixiang.co/go-mall/routers"
)
func init() {
setting.Setup()
models.Setup()
logging.Setup()
redis.Setup()
jwt.Setup()
}
// @title gin-shop API
// @version 1.0
// @description gin-shop商城后台管理系统
// @termsOfService https://gitee.com/guchengwuyue/gin-shop
// @license.name apache2
func main() {
gin.SetMode(setting.ServerSetting.RunMode)
routersInit := routers.InitRouter()
readTimeout := setting.ServerSetting.ReadTimeout
writeTimeout := setting.ServerSetting.WriteTimeout
endPoint := fmt.Sprintf(":%d", setting.ServerSetting.HttpPort)
maxHeaderBytes := 1 << 20
server := &http.Server{
Addr: endPoint,
Handler: routersInit,
ReadTimeout: readTimeout,
WriteTimeout: writeTimeout,
MaxHeaderBytes: maxHeaderBytes,
}
log.Printf("[info] start http server listening %s", endPoint)
server.ListenAndServe()
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/liujie8023/beego-vue-admin.git
git@gitee.com:liujie8023/beego-vue-admin.git
liujie8023
beego-vue-admin
beego-vue-admin
master

搜索帮助