A demo repo to connect a python server with a js cient using the gRPC framework.
docker-compose up --build
http://localhost:8081/echotest.html
implemented only unary and one-way streaming (server -> client).
python -m pip install grpcio &&
python -m pip install grpcio-tools
cd server
python -m grpc_tools.protoc
-I../common --python_out=.
--grpc_python_out=. ../common/echo.proto
(if not using docker-compose)
docker build -t grpcmatt/python-server .
docker run -p 9090:9090 grpcmatt/python-server
All the js code for this comes straight from here: /~https://github.com/grpc/grpc-web
Need to use envoy server as middle man between js client to python server.