Skip to content

TimeForCoin/Server

Repository files navigation

TimeForCoin.Server

License: MIT

Golang Version GoDoc

codecov

Codacy Badge CodeFactor codebeat badge

TimeForCoin 服务端

Usage 用法

须使用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

Test 测试

提交前建议先运行并通过单元测试

设置测试需要的环境变量,然后执行测试

go test -v .\app\...

Windows下的测试可以直接使用powershell执行 (须先设置好配置)

./test.default.ps1

Deploy 部署

默认使用Docker进行部署

docker build -t time-for-coin:v1 .
docker run -p 30233:30233 --name my-time-for-coin -d time-for-coin:v1