This example illustrates how to expose helloworld as gRPC APIs.
- Protocol buffer compiler v3
- Go plugins for the protocol compiler
See gRPC Go Quickstart for installation instructions.
$ go generate
Run the server:
$ go run cmd/main.go
2021/07/04 18:18:00 server listening at [::]:8080
Consume by grpcurl:
$ grpcurl -plaintext -d '{"name": "Tracey"}' :8080 pb.Service/SayHello
{
"message": "Hello Tracey"
}