amazing-gao / grpc-gateway-example

grpc & http gateway

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

start grpc server

go run cmd/grpc/server/main.go

> grpc listen 127.0.0.1:10000

start http server

go run cmd/http/main.go

> http listen 127.0.0.1:10001

start grpc client

go run cmd/grpc/client/main.go

> value:"hi bitebit"

start http client

curl -X POST http://127.0.0.1:10001/v1/example/echo --data '{"value": "bitebit"}'

> {"value":"hi bitebit"}

About

grpc & http gateway


Languages

Language:Go 78.4%Language:Shell 21.6%