1 Star 0 Fork 3

qu / gin-template

forked from 徐益庆 / gin-template 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
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         

启动

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/**/*

空文件

简介

基于golang web框架Gin搭建通用项目模板 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Go
1
https://gitee.com/qutest20190508/gin-template.git
git@gitee.com:qutest20190508/gin-template.git
qutest20190508
gin-template
gin-template
master

搜索帮助