Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sakiib/grpc-api
https://github.com/sakiib/grpc-api
api grpc grpc-gateway http2
Last synced: 6 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sakiib/grpc-api
- Owner: sakiib
- License: mit
- Created: 2021-07-24T07:24:42.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-25T09:53:13.000Z (over 3 years ago)
- Last Synced: 2024-06-21T18:47:28.717Z (5 months ago)
- Topics: api, grpc, grpc-gateway, http2
- Language: Go
- Homepage:
- Size: 2.28 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
### gRPC API
---
#### Clone the repo & run locally:
```bash
# 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:
```bash
# 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
```