Example showing how to use GRPC streams in NodeJS
Clone this code into your local using the following command
git clone https://github.com/aditya-sridhar/grpc-streams-nodejs-demo.git
Once the code is cloned. Get into the project folder and then Install npm packages using the following command
cd grpc-streams-nodejs-demo
npm install
In order to run the server code, Open a command prompt and run the following command
node server.js
We have 2 clients in the code
- client_grpc_client_stream.js: This code has a Client to show GRPC Client Streaming
- client_grpc_server_stream.js: This code has a Client to show GRPC Server Streaming
In order to run the client code, Open a separate Command prompt and run the following command
node client_grpc_client_stream.js
node client_grpc_server_stream.js