Skip to content

Instantly share code, notes, and snippets.

@ecyshor
Last active November 9, 2020 11:46
Show Gist options
  • Save ecyshor/fe26ba909158dd56199c66b26465ec5e to your computer and use it in GitHub Desktop.
Save ecyshor/fe26ba909158dd56199c66b26465ec5e to your computer and use it in GitHub Desktop.
Use local build of grpc-web

Using a custom build of grpc-web in your project

Clone the repo

git clone git@github.com:grpc/grpc-web.git

Install the web plugin to generate the code

you might need sudo apt-get install libprotoc-dev

sudo make install-plugin - (this installs the protoc-gen-grpc-web)

You can now generate the code using protoc

Prepare the grpc-web runtime on your local machine

Install the latest grpc-web runtime as a local npm package by linking it

cd packages/grpc-web
npm install
npm run prepare
yarnk link

Add the runtime in your project

yarn link grpc-web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment