https://github.com/ironcore864/grpc-example
https://github.com/ironcore864/grpc-example
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ironcore864/grpc-example
- Owner: IronCore864
- Created: 2019-11-28T13:27:25.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-28T13:27:36.000Z (over 6 years ago)
- Last Synced: 2024-05-23T04:17:53.408Z (about 2 years ago)
- Language: Go
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gRPC Example
In Golang.
## Pre-requisites
Make sure you have protocol buffer compiler and proto go package. Follow this document if you haven't done so:
https://github.com/IronCore864/protobuf-example
## Build
### Run `protoc` command (with the grpc plugin):
```
protoc -I helloworld/ helloworld/helloworld.proto --go_out=plugins=grpc:helloworld
```
### Build Server
```
cd server
go build
```
### Build Client
```
cd client
go build
```
## Run
Start server in the background:
```
cd server
./server &
```
Start client:
```
cd client
./client
```
To quit server:
```
fg
ctrl + c
```