Skip to content

gRPC & proto3 on Node.js Example with Simple RPC and Streaming RPC

Notifications You must be signed in to change notification settings

aishwarydhare/hello_grpc

Repository files navigation

gRPC & proto3 on Node.js Example

This directory contains code examples for all the Node.js based gRPC implementations, demonstrating example of -

  • simple RPC (like the simple REST)
  • streaming from server to client RPC
  • streaming from client to server RPC
  • bidirectional streaming RPC (both server and client streaming to each other at the same time)

I have made these examples by taking reference from official examples by gRPC

And, for more comprehensive documentation, including an overview and tutorials that use this example code, visit grpc.io.

Instructions

current example is demonstrating dynamic binary creation using notes.proto file using 'proto3' syntax version

  • install dependencies using

    $ npm install
  • to run gRPC server

    $ node server.js
  • to run example of simple RPC (like the simple REST)

    $ node get_notes.js
  • to run example of streaming from server to client RPC

    $ node get_stream.js
  • to run example of streaming from client to server RPC

    $ node put_stream.js
  • to run example of bidirectional streaming RPC

    $ node gp_stream.js

Other

TUTORIAL

You can find a more detailed tutorial in gRPC Basics: Node.js

About

gRPC & proto3 on Node.js Example with Simple RPC and Streaming RPC

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published