Skip to content

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

3 watching

Forks

Latest commit

 

History

44 Commits

Folders and files

Repository files navigation

gin-exampel

开发环境配置

  1. 设置github token 可以提升从github下载项目的速度
machine api.github.com
  login <username>
  password <token>
  1. 下载项目/编译/下载第三方包
go get github.com/hanminggui/gin-exampel
  • Linux
cd ~/go/src/github.com/hanminggui/gin-exampel
./install.sh
  • Windows
cd C:
cd C:\Users\song\go\src\github.com\hanminggui\gin-exampel
install.bat

生产环境运行环境配置

  • Linux
export GIN_MODE=release
  • Windows
set GIN_MODE=release

启动

  • build
go build main.go -o api
  • run
Linux
./api # (编译后运行)

Windows
api.exe #双击启动 (编译后运行)

文件说明

  • main.go 程序入口
  • install.sh 包管理文件unix
  • install.sh 包管理文件win
  • routers/ 路由及中间件
  • apis/ 接口逻辑
  • moudles/ 对象模型
  • lib/ 工具包
  • database/ 初始化mysql
  • config/ 初始化配置文件 生产环境部署时需要把配置文件拿过去

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages