Skip to content

hulklab/yago

Folders and files

NameName
Last commit message
Last commit date
Nov 25, 2019
Feb 1, 2023
Jun 7, 2022
Feb 1, 2023
Oct 31, 2022
Nov 26, 2021
Oct 21, 2022
May 23, 2019
Dec 23, 2020
Mar 8, 2021
Jun 5, 2024
Oct 21, 2022
Mar 3, 2020
Oct 21, 2022
Apr 7, 2022
Feb 8, 2023
Oct 31, 2022
Dec 23, 2020
Oct 21, 2022
Aug 19, 2019
Dec 23, 2020

Repository files navigation

Yago - Web Scaffold

avatar

目录

文档

Yago 文档

安装

首先你需要安装 Go (version 1.11+), 然后执行go get 安装yago
 go get github.com/hulklab/yago/yago

依赖

go >= 1.11(由于使用了 go mod 管理版本依赖)

如果想在GOPATH下用mod, 请设置 GO111MODULE=on 则在 GOPATH/src 目录下使用 go get 时也默认采用 go mod
export GO111MODULE=on

快速开始

1. 用 yago 在当前目录创建你的项目 myapp
yago init -a myapp
2. 进入目录初始化
cd myapp/
go mod init
3. 构建
go build
4. 创建属于自己的配置文件,并启动
sh env.init.sh yourname
./myapp
5. 控制是否需要在此机器上开启 task 任务,有两种方式
  • 修改配置文件中的 app.task_enable,默认为开启
  • 修改环境变量 export {{配置文件中的app_name}}_APP_TASK_ENABLE=1, 1 表示开启,0 表示关闭,配置文件与环境变量同时存在时环境变量生效

更多内容请查看 Yago 文档

感谢

gin cron cobra xorm logrus beego

特别鸣谢

Idea