This application has three modules -
- gRPC Backend
- JSON API Backend (
json-api
directory) - React Frontend (
react-ui
directory)
Request and the response flows are as follows:
- Request: React Frontend -> JSON API Backend -> gRPC Backend
- Response: gRPC Backend -> JSON API Backend -> React Frontend
- Install yarn -
npm install --global yarn
- Install
protoc
compiler. - GRPC tools npm package:
npm install --global grpc-tools
- Install
protoc
js plugin npm package:npm install --global protoc-gen-js-grpc
These commands generate gRPC client stub and server stub from proto files.
-
Windows:
make proto-win
-
Linux/Mac:
make proto-lin
Run all three modules in the following sequence -
go run main.go
cd json-api
cp .env.example .env
yarn dev
cd react-ui
cp .env.example .env
yarn dev