aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/node/static_codegen
diff options
context:
space:
mode:
authorGravatar Michiel de Jong <michiel@unhosted.org>2017-02-24 10:21:14 +0100
committerGravatar GitHub <noreply@github.com>2017-02-24 10:21:14 +0100
commit10cea4b121beb8697f758e08a2c48b443e20eefb (patch)
tree0166729b97ad70efb02b05a05a8aab703a721d92 /examples/node/static_codegen
parent8a6db33e7b8f4ff91b2c265c102a8bc7541ddf60 (diff)
Use grpc-tools npm package in readme
* Make it clearer which directory to `cd` to * Take advantage of the work done https://github.com/grpc/grpc/issues/5982
Diffstat (limited to 'examples/node/static_codegen')
-rw-r--r--examples/node/static_codegen/README.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/node/static_codegen/README.md b/examples/node/static_codegen/README.md
index fc97d34a38..0441b27f25 100644
--- a/examples/node/static_codegen/README.md
+++ b/examples/node/static_codegen/README.md
@@ -1,7 +1,8 @@
-This is the static code generation variant of the Node examples. Code in these examples is pre-generated using protoc and the Node gRPC protoc plugin, and the generated code can be found in various `*_pb.js` files. The command line sequence for generating those files is as follows (assuming that `protoc` and `grpc_node_plugin` are present, and starting in the base directory of this package):
+This is the static code generation variant of the Node examples. Code in these examples is pre-generated using protoc and the Node gRPC protoc plugin, and the generated code can be found in various `*_pb.js` files. The command line sequence for generating those files is as follows (assuming that `protoc` and `grpc_node_plugin` are present, and starting in the directory which contains this README.md file):
```sh
-cd ../protos
-protoc --js_out=import_style=commonjs,binary:../node/static_codegen/ --grpc_out=../node/static_codegen --plugin=protoc-gen-grpc=grpc_node_plugin helloworld.proto
-protoc --js_out=import_style=commonjs,binary:../node/static_codegen/route_guide/ --grpc_out=../node/static_codegen/route_guide/ --plugin=protoc-gen-grpc=grpc_node_plugin route_guide.proto
+cd ../../protos
+npm install -g grpc-tools
+grpc_tools_node_protoc --js_out=import_style=commonjs,binary:../node/static_codegen/ --grpc_out=../node/static_codegen --plugin=protoc-gen-grpc=`which grpc_tools_node_protoc_plugin` helloworld.proto
+grpc_tools_node_protoc --js_out=import_style=commonjs,binary:../node/static_codegen/route_guide/ --grpc_out=../node/static_codegen/route_guide/ --plugin=protoc-gen-grpc=`which grpc_tools_node_protoc_plugin` route_guide.proto
```