Skip to content

ridhogapx/grpc-gateway-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started

First, you need to install these binaries to use gRPC with protoc.

$ go install \
    github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway \
    github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 \
    google.golang.org/protobuf/cmd/protoc-gen-go \
    google.golang.org/grpc/cmd/protoc-gen-go-grpc

Before executing generate.sh make sure you have given permission to allow execute file (unix only).

$ chmod +x generate.sh

After that you can run these shell command

$ ./generate.sh

Now, you've generated protobuf that will be placed in /server/proto. You can run gRPC entrypoint and Gateway entrypoint.

$ go run server/cmd/entrypoint-grpc
$ go run server/cmd/entrypoint-gateway

About

A starter template for gRPC Gateway

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published