TimeForCoin 服务端
须使用Golang 1.12.x以上的版本(或者使用1.11.x并启用mod功能)
git clone https://github.com/TimeForCoin/Server.git
go mod download按照config.default.yaml创建配置文件,运行应用(默认从当前目录读取配置文件config.yaml)
go run main.go -c ./config.yaml提交前建议先运行并通过单元测试
设置测试需要的环境变量,然后执行测试
go test -v .\app\...Windows下的测试可以直接使用powershell执行 (须先设置好配置)
./test.default.ps1默认使用Docker进行部署
docker build -t time-for-coin:v1 .
docker run -p 30233:30233 --name my-time-for-coin -d time-for-coin:v1