Skip to content

tanayvaswani/grpcalc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grpcalc

A gRPC based calculator server and client.

Gears

  • go v1.23.2
  • protobuf (brew install protobuf)
  • protoc-gen-go
  • protoc-gen-go-grpc
  • some knowledge about protocol buffers
  • docker

How to run ?

  1. Using Docker

    docker build -t grpcalc .
    docker run -d -p 8080:8080 grpcalc

    Alternatively you can use makefile to run commands

    make build-docker-image
    docker run-docker-image
  2. Local Setup

    go mod tidy
    go run server/main.go

    Alternatively you can use makefile to run commands

    To generate proto code

    make generate
    make run-server

How to consume?

  • grpcui (brew install grpc)
grpcui --plaintext 127.0.0.1:8080
  • grpcurl
  grpcurl -d '{
    "a": 10,
    "b": 2
  }' 127.0.0.1:8080

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published