https://github.com/corani/grpc-gateway-demo
https://github.com/corani/grpc-gateway-demo
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/corani/grpc-gateway-demo
- Owner: corani
- Created: 2022-01-13T01:38:40.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-01-13T01:39:25.000Z (over 3 years ago)
- Last Synced: 2025-01-09T20:48:32.009Z (5 months ago)
- Language: Go
- Size: 7.31 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# grpc-gateway-test
Demo project for testing the gRPC gateway and OpenAPI spec generation.
## Running
Prerequisites: Go 1.17
Build the project by executing:
```bash
./build.sh -b
```Run the server by executing:
```bash
./build.sh -r
```This will start gRPC on port `8989` and the Gateway + Swagger UI on port `8990`.
To call the gRPC server directly you can use the included client:
```bash
./bin/client
```To view the Swagger UI, point your browser to http://localhost:8990/static/swagger-ui/
You can test the API right from the UI.## Changing
Generated gRPC and protobuf code is in the `gen` folder. This is generated from the definitions in the `proto` folder.
If you need to re-generate these files, you can do the following:
```bash
./build.sh -i # to install the tools
./build.sh -g # to run the generator
```Note: all required tools for code generation are vendored in the `tools` folder, and will be installed in the `tools/bin` folder.