/nestjs-grpc-stream-helloworld

This example shows how to use GRPC streams in nestjs. All required protobuf interfaces are generated automatically. This example covers both roles: GRPC-Server or GRPC-Client (common code).

Primary LanguageTypeScript

nestjs-grpc-stream-helloworld

About

This example shows how to use GRPC streams in nestjs. All required protobuf interfaces are generated automatically. This example covers both roles: GRPC-Server or GRPC-Client (common code).

Run as GRPC Server

cd backend
npm install
npm run start:server

Run as GRPC Client

cd backend
npm install
npm run start:client

Connect to a remote server

export CLOUD_SERVER=MY_REMOTE_SERVER
npm run start:client

Update Protobuf Interfaces

After extending a .PROTO file, the required interfaces for nestjs can be generated as follows:

cd backend
npm run generate:proto