This is a project with a basic example of grpc in golang for study purposes.
In root folder of project, run:
go get -u ./...
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
.
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