https://github.com/konsumer/protoc-plugin-grpc-main
Generate main.go for grpc-gateway
https://github.com/konsumer/protoc-plugin-grpc-main
Last synced: about 1 year ago
JSON representation
Generate main.go for grpc-gateway
- Host: GitHub
- URL: https://github.com/konsumer/protoc-plugin-grpc-main
- Owner: konsumer
- Created: 2017-03-22T03:00:45.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-26T05:06:32.000Z (about 9 years ago)
- Last Synced: 2025-02-13T16:22:43.698Z (over 1 year ago)
- Language: Go
- Size: 11.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# protoc-plugin-grpc-main
Generate a complete grpc-gateway main file
## usage
You must have protoc and node installed.
Do all the steps listed [here](https://github.com/grpc-ecosystem/grpc-gateway#usage), up to "Write an entrypoint", then run this:
```
protoc --plugin=`pwd`/src/protoc-gen-grpc-main --grpc-main_out=/output -I `pwd` `pwd`/helloworld.proto
```
## in docker
I made a docker container that will build your grpc gateway & swagger file, then run it. You don't need node, protoc, or go installed to try it out.
```
docker run -v `pwd`:`pwd` -v `pwd`/output:/output --rm -it konsumer/grpc-gateway -I `pwd` `pwd`/helloworld.proto
```
## todo
> needs lots of testing with diverse protobuf configurations
### options I should parse
* `template` - full-path to handlebars template instead of main_insecure.go
* `grpc_host` - `host:port` that gRPC server is running on
* `port` - port to listen to http
* SSL keys, etc