Skip to content

nathansousa/go-grpc-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GO GRPC TUTORIAL

This is a project with a basic example of grpc in golang for study purposes.

Installation

In root folder of project, run:

go get -u ./...

Running

Server

First run the grpc server using the following command:

go run ./server/cmd/main.go 

The following message should appear on the console: INFO[0000] GRPC server is running on port: 8000.

Client

Then run the client with the following command:

go run ./client/cmd/main.go 

The client will call the server's AddBook function simulating the insertion of a book and showing an id on the console.

Example: INFO[0000] a new was book added with id: 1fc6d548-356a-42cc-92ce-d03fb4758117

References

Releases

No releases published

Packages

No packages published

Languages