Skip to content

dreamsofcode-io/grpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 

Repository files navigation

Dreams of Code gRPC

This project provides the source code for the gRPC video by Dreams of Code.

Video instructions

In order to install protobuf on your own machine, you can use the following commands

macOS

$ brew install protobuf protoc-gen-go protoc-gen-go-grpc

alternatively you can install the protoc plugins using golang

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

Arch Linux

$ pacman -S protobuf

Plugins

Using yay

$ yay -S protoc-gen-go protoc-gen-go-grpc

Using golang

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

GRPC Clients

In this video, I use grpcui and grpcurl

Calculator

The calculator code can be found in the ./calulator directory.

You can also deploy an instance of it yourself on acorn by clicking the following button:

Run in Acorn

Pokedex

The Pokedex API can be found in the ./pokemon-api directory.

You can also deploy an instance of it yourself on acorn by clicking the following button:

Run in Acorn

Disabling TLS

When writing gRPC code, you can disable tls by using the following lines

opts := []grpc.DialOption{
    grpc.WithTransportCredentials(insecure.NewCredentials())
}

If you're wanting to connect locally, you'll need to use the -plaintext flag with both grpcui and grpcurl

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published