Skip to content

⚡️ strongly typed TypeScript microservice communcation through tRPC

License

Notifications You must be signed in to change notification settings

mkopecki/trpc-microservices

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚡️ Microservice Communication with tRPC

Introduction

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.

Prerequisites

  • Node 18 - @trpc/client requires access to a native implementation of fetch

Quickstart

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

About

⚡️ strongly typed TypeScript microservice communcation through tRPC

Topics

Resources

License

Stars

Watchers

Forks