Skip to content

Latest commit

 

History

History
50 lines (28 loc) · 780 Bytes

README.md

File metadata and controls

50 lines (28 loc) · 780 Bytes

gRPC template for Go

A template for running gRPC implementations.

Prerequisites

Installation

  • Clone this repository

  • Run the following to install protocol compiler plugins

go install google.golang.org/protobuf/cmd/[email protected]

go install google.golang.org/grpc/cmd/[email protected]
  • Update GO ENV path:
export PATH="$PATH:$(go env GOPATH)/bin"
  • Edit the .proto file as per your liking

  • Run the following command

protoc --go_out=. --go_opt=paths=source_relative \
    --go-grpc_out=. --go-grpc_opt=paths=source_relative \
    proto/*.proto
  • Add implementations to client.go and server.go

  • Finally , Run

go run server/server.go
go run client/client.go