https://github.com/tkmpypy/grpc-sample-client-server-golang
Sample repositories for gRPC client and server.
https://github.com/tkmpypy/grpc-sample-client-server-golang
go golang grpc grpc-client grpc-go grpc-server
Last synced: 3 months ago
JSON representation
Sample repositories for gRPC client and server.
- Host: GitHub
- URL: https://github.com/tkmpypy/grpc-sample-client-server-golang
- Owner: tkmpypy
- Created: 2021-09-03T11:16:48.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-12-06T09:29:10.000Z (over 4 years ago)
- Last Synced: 2025-12-02T02:09:09.347Z (4 months ago)
- Topics: go, golang, grpc, grpc-client, grpc-go, grpc-server
- Language: TypeScript
- Homepage:
- Size: 417 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# grpc-sample-server-golang
## About
- this sample project implemented by used proto file defined by [this](https://github.com/tkmpypy/grpc-sample-proto) repository
- this sample repository is monolithic repository
## Prerequired
| tool | summary |
| -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| [Golang](https://golang.org/doc/devel/release.html) | Golang runtime |
| [Protocol buffer compiler](https://github.com/protocolbuffers/protobuf/releases) | Protocol Buffer compiler |
| protoc-gen-go | protoc plugin for Golang |
| protoc-gen-go-grpc | protoc plugin for Golang |
| [protoc-gen-grpc-gateway](https://github.com/grpc-ecosystem/grpc-gateway) | It reads protobuf service definitions and generates a reverse-proxy server which translates a RESTful HTTP API into gRPC |
| [protodep](https://github.com/stormcat24/protodep) | Dependency tool for Protocol Buffers IDL file (.proto) vendoring tool. |
| [Buf](https://github.com/bufbuild/buf) | Building a modern Protobuf ecosystem |
## Preparation
### Dependencies
```sh
$ cd ./server
$ protodep up -u -f
$ buf mod update
$ buf build
$ buf generate
$ go mod tidy
```
or
```sh
$ cd ./server
$ make dep
```
_and do same operation in `./gateway` directory_
## Build and Run
1. `docker-compose up`
2. Go to `http://localhost:3003` in your browser