# gin-template **Repository Path**: qutest20190508/gin-template ## Basic Information - **Project Name**: gin-template - **Description**: 基于golang web框架Gin搭建通用项目模板 - **Primary Language**: Go - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 3 - **Created**: 2021-12-02 - **Last Updated**: 2021-12-02 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # gin-template #### 介绍 基于golang web框架Gin搭建通用项目模板 构建restful api #### 软件架构 golang Gin gorm jwt token认证go-jwt gorilla-websocket服务 手动集成swagger #### 项目目录 ├─conf 配置文件 ├─docs 文档 ├─handlers 接口 ├─middlewares 中间件 ├─models 模型 ├─pkg 自定义 │ ├─jwt jwt │ └─util 工具 ├─routers 路由 ├─serializers 序列化 ├─static 静态文件 │ ├─css │ ├─img │ └─js ├─templates 模板 │ .gitignore git │ go.mod go mod │ go.sum go mod | main linux执行文件 │ main.go main入口 | nginx.conf nginx配置 | supervisor supervisor配置 │ README.md #### 启动 ```shell script go mod tidy // 包管理 go mod vendor // 同步包文件 go run main.go -h 0.0.0.0 -p 7887 -debug -err -orm // 入口 bee run // 热重载 ``` #### 部署 ```shell script go build main.go ./main -p 7890 -debug=false -err=false -orm=false ``` #### 备注 git conf文件夹下conf.ini配置文件 ```ini [mysql] Type = mysql Host = 127.0.01 Port = 3306 User = root Password = root DB = db Charset = utf8mb4 Prefix = gin_ [jwt] SecretKey = abc [project] StaticUrlMapPath = {"assets/static/": "static/", "assets/docs/": "docs/"} TemplateGlob = templates/**/* ```