Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 39 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,47 @@
# PingPong Server
this is grpc server for testing pbkit packages.

## Before Start

Require installing [pollapo](https://pbkit.dev/docs/getting-started/installation), [go](https://go.dev/doc/install), [protoc](https://github.com/protocolbuffers/protobuf/releases/tag/v21.8).

(Require installing [nodejs](https://nodejs.org/ko/download/) and [yarn](https://yarnpkg.com/getting-started/install) for client.)

And Install `protoc-gen-go` and `protoc-gen-go-grpc`.

- MacOS
- Run `brew install protoc-gen-go protoc-gen-go-grpc`
- Windows
- Run `go install google.golang.org/protobuf/cmd/protoc-gen-go@latest`
- Run `go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest`

Clone pingpong-server and api-common-protos.

```sh
git clone https://github.com/pbkit/pingpong-server.git
git clone https://github.com/googleapis/api-common-protos.git
```

## How to start?

Gen go file for protoc.

```sh
brew tap riiid/riiid
brew install pbkit
brew install go protoc-gen-go protoc-gen-go-grpc
cd ./pingpong-server

pollapo install
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative -I=.pollapo .pollapo/pbkit/interface-pingpong-server/pingpong.proto

protoc --go_out="." --go_opt=paths=source_relative --go-grpc_out="." --go-grpc_opt=paths=source_relative -I=".pollapo" .pollapo/pbkit/interface-pingpong-server/pingpong.proto -I="../api-common-protos/"
```

And start pingpong server.

```sh
go run main.go
```

### Then...

Clone [pingpong-client](https://github.com/pbkit/pingpong-client) and Install [pbkit-devtools](https://github.com/pbkit/pbkit-devtools).

And Enjoy Coding!