Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A simple example of how to use GRPC on golang.

NotificationsYou must be signed in to change notification settings

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'sAddBook 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


[8]ページ先頭

©2009-2025 Movatter.jp