Edit this page
gRPC
Community-led documentation about using gRPC with Vike.
💚This page may contain outdated information, PR welcome to update or improve this page.
There are no gRPC client for the browser. (Protocol Buffers does not support the browser.)
This means you cannot call gRPC endpoints directly from the browser; you always need to call gRPC endpoints from your Node.js server.
For fetching data,
you can simply use a onBeforeRender()
hook,
since onBeforeRender()
hooks are called in Node.js.
For mutating data:
- You create a new HTTP endpoint. For example, if you use Express.js:
- You then call your HTTP endpoint from the browser.