Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hint how to use with grpc-web? #152

Closed
blake-regalia opened this issue Jul 8, 2022 · 2 comments
Closed

Hint how to use with grpc-web? #152

blake-regalia opened this issue Jul 8, 2022 · 2 comments

Comments

@blake-regalia
Copy link

I understand that there is ongoing refactoring to support grpc-web without manual intervention, and I've dived thru the various issues/discussions, but i'm not super familiar with the various components.

Are there any references that could be provided to help devs in my situation get started? Plugging grpc-web into --ts_opt=grpc_package=xxx option doesn't work and i'm sure there's more to it than that, but no idea where to start. Any help would be greatly appreciated.

@thesayyn
Copy link
Owner

thesayyn commented Jul 9, 2022

current workaround is;

1- use protoc-gen-ts to generate @grpc/grpc-js compatible RPC code and put it behind an envoy proxy so that grpc-web can talk to it.
2- use protoc-gen-ts to generate message, enums etc.
3- use grpc-web generator to generate grpc-web compatible client code and replace imports. xxxx_pb to xxxx

there might be additional steps and code paths to update to make it work with protoc-gen-ts but the obvious ones are above.

Happy to guide anyone who's up for making an example.

@thesayyn
Copy link
Owner

#102 landed. I'll cut a new release shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants