Skip to content

install

Tinson Ho edited this page Jul 25, 2019 · 19 revisions

推荐环境配置(Mac/Linux)

sudo vim ~/.bash_profile
export GOPATH="/go"
export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
export GO111MODULE=on
export GOPROXY=https://goproxy.io
source ~/.bash_profile

安装

go get -u github.com/qit-team/snow/tool/snow
cd $GOPATH/src
snow new snow-demo

编译

cd snow-demo
sh build/shell/build.sh

启动

1. build/bin/snow -a api  #启动Api服务
2. build/bin/snow -a cron #启动Cron定时任务服务
3. build/bin/snow -a job  #启动队列调度服务
4. build/bin/snow -a command -m test  #执行名称为test的脚本任务

脚手架

升级

snow upgrade

帮助

snow -h

新建项目

snow new {ProjectName} 
# 查看new支持的可选参数
snow new --help

新建Model

snow model {ProjectName} 
# 查看model支持的可选参数
snow model --help
Clone this wiki locally