makefile & doc

This commit is contained in:
lu.bai
2022-11-24 15:25:16 +08:00
parent f7b5854734
commit 9d095d21ec
3 changed files with 27 additions and 0 deletions

12
Makefile Normal file
View File

@@ -0,0 +1,12 @@
CUR_DIR=$(shell pwd)
.PHONY: dev_tool
# 安装工具
dev_tool:
# install protoc
go install github.com/golang/protobuf/protoc-gen-go@v1.5.2
.PHONY: gen
# gen 生成代码
gen:
cd protocol/proto && make gen

View File

@@ -1,3 +1,15 @@
# hk4e
hk4e game server
## 开发快速上手
* Go >= 1.19
1. 首次需要安装工具 `make dev_tool`
1. 生成协议 `make gen`
## 快速运行
* mongodb
* nats-server
1. 启动dispatch `cd dispatch/cmd && go run .`
1. 启动gate `cd gate/cmd && go run .`
1. 启动gs `cd gs/cmd && go run .`

3
protocol/proto/Makefile Normal file
View File

@@ -0,0 +1,3 @@
# gen 生成proto
gen:
protoc -I. --go_out=paths=source_relative:. ./*.proto