Skip to content
This repository was archived by the owner on Dec 4, 2021. It is now read-only.

Generating Code

Evan Ugarte edited this page Apr 21, 2020 · 1 revision

Generating Code

Node

To generate the *_pb.js files in client/, first install protoc-gen-grpc using npm:

npm install -g protoc-gen-grpc

Then, generate the files from the topmost directory in this repository using the tool:

protoc-gen-grpc \
--js_out=import_style=commonjs,binary:./client/ \
--grpc_out=./client --proto_path proto/ \
./proto/<your proto file here>

Python

To generate the print_pb2*.py files in server/, first install grpc for python using pip:

python3 -m pip install grpcio

Then, generate the files from the topmost directory in this repository using the tool:

cd proto && python3 -m grpc_tools.protoc -I. --python_out=../server \
--grpc_python_out=../server <your proto here>

Clone this wiki locally