代码拉取完成,页面将自动刷新
同步操作将从 徐益庆/gin-template 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
基于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
go mod tidy // 包管理
go mod vendor // 同步包文件
go run main.go -h 0.0.0.0 -p 7887 -debug -err -orm // 入口
bee run // 热重载
go build main.go
./main -p 7890 -debug=false -err=false -orm=false
git conf文件夹下conf.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/**/*
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。