grpc-with-http

command module
v0.0.0-...-fde96c3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 10 Imported by: 0

README

grpc-with-http

This repo demonstrates how to setup a gRPC service with a HTTP gateway, forked from a boilerplate repo https://github.com/johanbrandhorst/grpc-gateway-boilerplate.

Setup

make generate

Running

$ go run main.go

The HTTP endpoint is served on https://0.0.0.0:10000.

A Swagger UI is served on https://0.0.0.0:11000/.

Requests

POST:

curl -X 'POST' \
  'https://localhost:11000/api/v1/users' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{}'

GET:

curl -X 'GET' \
  'https://localhost:11000/api/v1/users' \
  -H 'accept: application/json'

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cmd
proto
users/v1
Package usersv1 is a reverse proxy.
Package usersv1 is a reverse proxy.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL