RPC protocols such as gRPC are widely used to provide a typesafe communication layer between microservices. This project provides a demo on how to use tRPC to allow fast, lightweight and strongly typed communication between Node.js microservices without the need for protobuf or other interface description languages.
- Node 18 -
@trpc/client
requires access to a native implementation of fetch
local setup of containerized microservices
# build docker images
docker-compose build
# start containers in background
docker-compose up -d
testing inter-service communication
cd scripts
yarn test