# From root dir
docker-compose up --build node-server envoy ts-client
Visit http://localhost:8081/echotest.html
# From root dir
docker-compose up --build node-server envoy
cd net/grpc/gateway/examples/echo
RUN protoc -I=. echo.proto \
--js_out=import_style=commonjs:./ts-example \
--grpc-web_out=import_style=commonjs+dts,mode=grpcwebtext:./ts-example
RUN protoc -I=. echo.proto \
--js_out=import_style=commonjs:./ts-example \
--grpc-web_out=import_style=typescript,mode=grpcwebtext:./ts-example
Change client.ts
to use import style Option 2 if you had chosen import_style=typescript
above:
cd net/grpc/gateway/examples/echo/ts-example
npm install
npx tsc
mv *_pb.js dist/
npx webpack
# In the ./ts-example folder
python3 -m http.server 8081