Homebrew install javascript-protoc
brew install protoc-gen-grpc-web
Build the images
docker-compose build
Run the server via docker
docker-compose up
Run 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.yaml
file 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.html
anddist/main.js
we generated earlier.
npx http-server -p 8081
More info: https://github.com/grpc/grpc-web/tree/master/net/grpc/gateway/examples/helloworld