Homebrew install javascript-protoc
brew install protoc-gen-grpc-webBuild the images
docker-compose buildRun the server via docker
docker-compose upRun the front-end
npm run start- Run the NodeJS gRPC Service. This listens at port
:9090.
node server.js- Run the Envoy proxy. The
envoy.yamlfile configures Envoy to listen to browser requests at port:8080, and forward them to port:9090(see above).
docker run -d -v "$(pwd)"/envoy.yaml:/etc/envoy/envoy.yaml:ro \
-p 8080:8080 -p 9901:9901 envoyproxy/envoy:v1.27-latest- Run the simple Web Server. This hosts the static file
index.htmlanddist/main.jswe generated earlier.
npx http-server -p 8081More info: https://github.com/grpc/grpc-web/tree/master/net/grpc/gateway/examples/helloworld