/grpc-demo

Primary LanguageGoMIT LicenseMIT

grpc-demo

  1. Install protoc
brew install protobuf
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
  1. Generate files
protoc --go_out=. --go_opt=paths=source_relative --go-grpc_out=. --go-grpc_opt=paths=source_relative user/user_service.proto
  1. Run the server
go run server/server.go
  1. Run the client
go run client/client.go