This project is a minimal starter template to quickly get grpc-web working with a Rust backend and React frontend. It takes care of proxying (Envoy not necessary), CORS, and generating types in TS and Rust.
If you prefer to use a framework other than React, it should be easy enough to change (just keep the scripts in package.json)
This project comes with an EchoService as a template. To create new services:
- Add a new proto file in
grpc-backend/proto - Add this file to
grpc-backend/build.rs - Implement the service in
grpc-backend/src/services - Add the service to the server in
grpc-backend/main.rs - Run
npm proto:generateon the client - Call the service on the client! (see
client/src/App.tsx)