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

Usage ? #86

Open
kennydefie opened this issue Apr 3, 2021 · 2 comments
Open

Usage ? #86

kennydefie opened this issue Apr 3, 2021 · 2 comments

Comments

@kennydefie
Copy link

Installed extension and in Usage I see this:

const enableDevTools = window.GRPCWEB_DEVTOOLS || (() => {});
const client = new EchoServiceClient('http://myapi.com');
enableDevTools([
client,
]);

I added the snippet code into my own client.js file and changed client to my respective service and endpoint... reloaded the app inside chrome and I don't see anything being displayed in gRPC-Web under inspect window...

I'm confused on how to use this?

Let me know thanks,

@shotexa
Copy link

shotexa commented Jun 1, 2021

@kennydefie Have you been able to use it?

@keithleungwork
Copy link

keithleungwork commented Jul 29, 2021

In case anyone meet this problem, here is the solution:

The "EchoServiceClient" in document is an example, actually you need to import the service client from the generated xxxx_grpc_web_pb.js

For example, my client is chatServiceClient, so I write like this:

import { ChatServiceClient } from "./protobuffer/chat_grpc_web_pb";
const client = new ChatServiceClient("http://localhost:8080", null, null);

// for debug
const enableDevTools = window.__GRPCWEB_DEVTOOLS__ || (() => {})
enableDevTools([
  client
]);

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

3 participants