aboutsummaryrefslogtreecommitdiffhomepage
path: root/examples/node
diff options
context:
space:
mode:
authorGravatar Sree Kuchibhotla <sreek@google.com>2017-03-22 13:00:04 -0700
committerGravatar Sree Kuchibhotla <sreek@google.com>2017-03-22 13:00:04 -0700
commite414d6cf00bddd50054c0e869091159331736da4 (patch)
treefb6e515a1c614abf57f42e247beb62b6e39a23d3 /examples/node
parent313b895064053adbae6071c3bee5d03cd16a6e56 (diff)
parent3f90a955a95b22ef39fece2de82fbef828c0e159 (diff)
Merge branch 'master' into cq_create_api_changes
Diffstat (limited to 'examples/node')
-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
```