mirror of
https://github.com/FlourishingWorld/hk4e.git
synced 2026-02-04 14:22:26 +08:00
makefile & doc
This commit is contained in:
12
Makefile
Normal file
12
Makefile
Normal 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
|
||||
12
README.md
12
README.md
@@ -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
3
protocol/proto/Makefile
Normal file
@@ -0,0 +1,3 @@
|
||||
# gen 生成proto
|
||||
gen:
|
||||
protoc -I. --go_out=paths=source_relative:. ./*.proto
|
||||
Reference in New Issue
Block a user