grpc-api

module
v0.0.0-...-67066b3 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2021 License: MIT

README

gRPC API


Clone the repo & run locally:

# install the dependencies
$ make install
# generate pb.go, pb.gw.go, grpc.pb.go
$ make gen
# run the gRPC server & the gateway
# format go code
$ make fmt
# generate tls certificates
$ make gen-certs
# gRPC server running on port: 8080 & the gateway server running on port: 8000
$ make run
# run the unit-tests
$ make unit-tests
# remove the generated pb.go, pb.gw.go, grpc.pb.go
$ make clean
# set environment variable for enabling tls
$ export tls=true

or Use the docker image:

# pull the docker image
$ docker pull sakibalamin/grpc-api:v0.0.1
# run with tls disabled
$ docker run -p 8000:8000 -it sakibalamin/grpc-api:v0.0.1
# run with tls enabled
$ docker run -e tls=true -p 8000:8000 -it sakibalamin/grpc-api:v0.0.1

Directories

Path Synopsis
gen
go/book
Package book is a reverse proxy.
Package book is a reverse proxy.

Jump to

Keyboard shortcuts

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