Skip to content

A simple example of a client-server application using gRPC in Go (golang) to exchange personalized greetings and messages.

License

Notifications You must be signed in to change notification settings

sigsegv1989/hello-world-grpc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hello World gRPC

This repository contains a simple example of a client-server application using gRPC in Go (golang). The application demonstrates how to exchange personalized greetings and messages between a client and a server.

Prerequisites

Before running the code in this repository, make sure you have the following prerequisites installed:

  • Go (golang): You can download and install Go from the official website: https://golang.org/dl/
  • Protocol Buffers (Protobuf): You can download and install from the official GitHub repository: protobuf/protobuf
  • gRPC Go packages: You can install them using the following command:
   go install google.golang.org/protobuf/cmd/protoc-gen-go
   go install google.golang.org/grpc/cmd/protoc-gen-go-grpc

How to Run

  1. Clone this repository to your local machine:
   git clone https://github.com/sigsegv1989/hello-world-grpc.git
  1. Navigate to the repository directory:
   cd hello-world-grpc
  1. Build the client, server binary and docker images:
   make docker-build
  1. Start the server:
   make docker-run-server
  1. Run the client:
   make docker-run-client
  1. You should see the interaction between the client and server, exchanging personalized greetings and messages.

Project Structure

  • api/hello.proto: Protocol Buffers (.proto) file defining the message and service.
  • server/server.go: Server implementation that receives and responds to gRPC requests.
  • client/client.go: Client implementation that sends gRPC requests to the server.
  • certs/: TLS/SSL certificates to enable the mutual authentication between gRPC client and server.

License

This repository contains a simple client-server application intended for study purposes. Please note that this code is provided as-is and comes with no guarantee of functioning correctly in a production environment.

This project is licensed under the MIT License - see the LICENSE file for details.

About

A simple example of a client-server application using gRPC in Go (golang) to exchange personalized greetings and messages.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published