Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 598 Bytes

README.md

File metadata and controls

28 lines (20 loc) · 598 Bytes

Simple nodejs gRPC

  • First, you'll need to install the required dependencies:
git clone
cd simple-grpc-nodejs
npm i
  • Then, let's create a gRPC service definition in example.proto:
  • Next, let's create a server that implements the Greeter service:
  • Finally, let's create a client that calls the SayHello method on the server:

That's it! This is a very basic example of gRPC in Node.js. For more advanced usage, you can refer to the official gRPC documentation:

To run

First bash or terminal

node ./greeter.js

Second bash or terminal

node ./SayHello.js