

GitHub - iamrajiv/helloworld-grpc-gateway: It is a simple hello world program th...
source link: https://github.com/iamrajiv/helloworld-grpc-gateway
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

About
It is a simple hello world program that uses gRPC-Gateway. This project was created when I participated in Google Season of Docs 2020 with gRPC-Gateway. The reason for making this project is to make people familiarize themselves with gRPC-Gateway.
I have added all the tutorials related to Hello World gRPC-Gateway to the gRPC-Gateway documentation website.
To get more references about gRPC-Gateway check out Basic Arithmetic gRPC Server.
It is a Basic Arithmetic gRPC server that uses gRPC-Gateway and reads protobuf service definitions and generates a reverse-proxy server. It performs four basic operations Addition, Division, Multiplication, and Subtraction between two given integers.
Folder structure:
.
├── LICENSE
├── Makefile
├── README.md
├── assets
│ └── helloworld-grpc-gateway.svg
├── buf.gen.yaml
├── buf.yaml
├── go.mod
├── go.sum
├── main.go
└── proto
├── google
│ └── api
│ ├── annotations.proto
│ └── http.proto
└── helloworld
├── hello_world.pb.go
├── hello_world.pb.gw.go
├── hello_world.proto
├── hello_world.swagger.json
└── hello_world_grpc.pb.go
Usage
Before running this project install all the required Go packages by running the command make install
. Also, we can generate the stubs using the command make generate
and delete the stubs using the command make clean
.
Start the server using the command:
go run main.go
Then use cURL to send HTTP requests:
curl -X POST -k http://localhost:8090/v1/example/echo -d '{"name": "hello"}'
{"message":"hello world"}
Swagger UI
Link: https://app.swaggerhub.com/apis/iamrajiv/Hello_World_gRPC-Gateway/2
License
Recommend
-
113
Hive实用函数大全 为什么叫实用函数,因为有些不实用的函数没有写进文档中,哈哈。 参考文档: 《Apache Hive Cookbook》 Hive分析窗口函数(一) SUM,AVG,MIN,...
-
80
机器学习入门之HelloWorld(Tensorflow)
-
76
springboot+mybatisHelloWorld示例。版本:springboot-1.5.1.RELEASE、mybatis-spring-boot-1.2.01,maven配置文件pom.xml如下:<properties><java.version>1.8</java.version><project.build.sourceEncoding&
-
35
README.md ???? …is...
-
40
README.md helloworld This is a test hello world repository of flatbean. Since Jan,11.2019 We use this repository to practice Python. ip.p...
-
13
README.md helloworld 不定时开放群链接:https://t.me/joinchat/GsDnhtkdKJ4nbwJh 特别声明:...
-
18
Files Permalink Latest commit message Commit time
-
9
-
7
-
6
Programming "Hello, World" in MS-DOS The program HELLO.COM was developed on MS-DOS Version 6.22 using the DOS program named DEBUG.EXE. It is exactly 23 bytes in length. It can be used to print the string "hello,...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK