Created
August 3, 2017 19:18
-
-
Save ksmithut/4fce0d716460326510d2e8d98a34853e to your computer and use it in GitHub Desktop.
Describes how do to static code gen for grpc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yarn add grpc-tools | |
# In package.json scripts... | |
grpc_tools_node_protoc \ | |
--js_out=import_style=commonjs,binary:. \ | |
--grpc_out=. \ | |
--plugin=protoc-gen-grpc=`which grpc_tools_node_protoc_plugin` \ | |
path/to/proto/file.proto | |
# Proto Example: https://github.com/grpc/grpc/blob/master/examples/protos/helloworld.proto | |
# Server Example: https://github.com/grpc/grpc/blob/master/examples/node/static_codegen/greeter_server.js | |
# Client Example: https://github.com/grpc/grpc/blob/master/examples/node/static_codegen/greeter_client.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks very much. Lost 1 hour for looking this 😢