i try to use demo by this
https://github.com/grpc/grpc-web/tree/master/net/grpc/gateway/examples/helloworld
i want too simple so i didnt use docker and envoy;
i make the client.js to request 8080 port and the server.js listen 8080 port.
just modify this
// client
var client = new GreeterClient('http://127.0.0.1:8080',
null, null);
//server
server.bind('0.0.0.0:8080', grpc.ServerCredentials.createInsecure());
when i open it in chrome it shows :

i add log in server method
function doSayHello(call, callback) {
console.log('hello');
callback(null, {message: 'Hello! '+ call.request.name});
}
but the hello not show
i think the server didnt get the request.
chrome 76.0.3809.100
You cannot not use Envoy for gRPC-Web at the moment. gRPC-Web browser client cannot communicate directly with a gRPC backend.
You cannot not use Envoy for gRPC-Web at the moment. gRPC-Web browser client cannot communicate directly with a gRPC backend.
thanks!
can I use Nginx instead of Envoy ?
if I can,how do I configure Nginx?
or work only used by Envoy?
I find nginx enable to use gprc on version 1.13,and I used 1.15
I try everything to config the nginx ,then the result is #503
2019/08/31 18:11:15 [error] 21756#26044:
*2 upstream rejected request with error 2 while reading response header from upstream,
client: 127.0.0.1,
server: grpct.cn,
request: "POST /helloworld.Greeter/SayHello HTTP/2.0",
upstream: "grpc://127.0.0.1:50051",
host: "grpct.cn",
referrer: "https://grpct.cn/"
@stanley-cheung
You cannot not use Envoy for gRPC-Web at the moment. gRPC-Web browser client cannot communicate directly with a gRPC backend.
I did exactly that earlier today but without TLS. And it was through a Docker instance on Win10 connected to a .net core grpc service.
It would make sense to get nginx working again with the latest release. Perhaps the original author could weigh-in and outline the integration issues.
@stanley-cheung
You cannot not use Envoy for gRPC-Web at the moment. gRPC-Web browser client cannot communicate directly with a gRPC backend.
I did exactly that earlier today but without TLS. And it was through a Docker instance on Win10 connected to a .net core grpc service.
It would make sense to get nginx working again with the latest release. Perhaps the original author could weigh-in and outline the integration issues.
my server only run on nginx proxy,and its can not work.
so I can not use grpc-web. :(
Cross-domain is one of the issues preventing grpc-web from moving forward
my server only run on nginx proxy,and its can not work.
so I can not use grpc-web. :(
FWIW, I have a Server 2019 VM instance running the “built-in” Docker service (Linux container). On that, the Envoy proxy is handling the required HTTP 1.1 to 2.0 translation. Server 2016 may also work given the appropriate build.
Cross-domain is one of the issues preventing grpc-web from moving forward
HTTP/2 is the obstacle in my experience.
Not aware of any explicit CORS limitations re HTTP/2. Wouldn’t that be a server configuration issue?
So difficult.
So difficult.
Use the Envoy proxy. Works well even with SSL