According to https://github.com/protocolbuffers/protobuf/issues/1591 , there is no generated fromObject method for Protocol Bufffer compiled JavaScript file by protoc
.
In addition to generated JavaScript file, TypeScript file with fromObject method definition is also needed to use grpc-web and grpc-node with TypeScript.
To enable fromObject
, there are three things to fix.
- Fix protobuf to generate fromObject method for protobuf JavaScript
- Fix grpc-web to generate fromObject method for grpc-web TypeScript
- Fix grpc_tools_node_protoc_ts to generate fromObject method for grpc-node TypeScript
This repository builds Docker image with these fix to ease file generation.
To compile proto files, run make codegen
under examples directory.
To run example server/proxy/client, run the following commands with separate terminals under examples directory.
# terminal 1
make server
# terminal 2
make proxy
# terminal 3
make client
Then, access to http://localhost:3000.
make build