Skip to content

gRPC blog service from gRPC Master Class: Build Modern API & Microservices on Udemy

Notifications You must be signed in to change notification settings

mthaler/grpc-blog-service

Repository files navigation

grpc-blog-service

gRPC blog service from gRPC Master Class: Build Modern API & Microservices on Udemy

Install the protobuf compiler plugins for Go using the following commands:

$ go get google.golang.org/protobuf/cmd/protoc-gen-go \
         google.golang.org/grpc/cmd/protoc-gen-go-grpc

Update PATH so that the protoc compiler can find the plugins:

$ export PATH="$PATH:$(go env GOPATH)/bin"

Compile a gRPC service

$ protoc --go_out=. --go-grpc_out=.  blogpb/blog.proto

Install MongoDB

Download MongoDB from https://www.mongodb.com/try/download/community and install it. On Debian Linux, run the following commands to start mongod:

# systemctl enable mongod
# systemctl start mongod
# systemctl status mongod

The last command should show that mongod was started successfully.

Install Robo 3T

Robo 3T is a GUI for MongoDB. Install the latest release from GitHub releases.

Robo 3T can be used to inspect the blog database:

Robo 3T

Install MongoDB Go Driver

To connect to MongoDB the blog serivce uses the mongodb-go-driver

To add the dependency, do

$ go get go.mongodb.org/mongo-driver/mongo

About

gRPC blog service from gRPC Master Class: Build Modern API & Microservices on Udemy

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published