Simple example of the generated service.
It serves 2 protocols: HTTP (REST) and GRPC.
Both are using the same handler for business logic.
Each protocol has corresponding autogenerated client.
Example is able to run 3 binaries:
- server (with a middleware to recover from panics)
- HTTP client
- GRPC client
Everything is generated from sum.proto.
How to run
Server
make run-server
HTTP client
make run-client-http
GRPC client
make run-client-grpc
Regenerate protobuf
make build
If you also want to regenerate the implementation
To force rebuild all files during generation, change force=false
to force=true
in the Makefile.