Skip to content

wapa5pow/protoc-node

Repository files navigation

protoc for grpc-web and grpc-node with fromObject

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.

  1. Fix protobuf to generate fromObject method for protobuf JavaScript
  2. Fix grpc-web to generate fromObject method for grpc-web TypeScript
  3. 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.

Getting started with examples

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.

How to build own Docker image for protoc

make build

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published