gRPC is a Remote Procedure Call (RPC) framework based on protobufs and HTTP/2. We want to generate a gRPC API and Rest API from a single protobuf .proto
file compiled with a Protocol Buffer compiler, protoc
.
- Install Golang
- Include
$GOPATH/bin
in$PATH
- Install protobuf
- Install grpc-gateway packages
We need to first install the compiler
brew install protobuf
We also need the grpc-gateway packages
go get -u github.com/golang/protobuf/protoc-gen-go
./ctl.sh gen stub
echo_server &
echo_client "Alejandro"