Skip to content

aliraza-dev/greeter-grpc-api-node

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

gRPC implementation using Node.js

What is gRPC

gRPC (gRPC Remote Procedure Calls) is an open source remote procedure call (RPC) system initially developed at Google. It uses HTTP/2 for transport, Protocol Buffers as the interface description language, and provides features such as authentication, bidirectional streaming and flow control, blocking or nonblocking bindings, and cancellation and timeouts.

You can read more about grpc here

Introduction

It's a basic Hello World grpc Api where we have a server and a client. To run the application first boot up the server by running the server.js file. When server is up and running, we can run the client application to send request to server and get response. Steps are as follows Open an instance of terminal and run the following commands

    npm build ./src/
    node ./src/server.js

Open another instance of terminal and run the following command

    node ./src/client.js

On running the client file, you'll get the following response

{ "message": "Hello World" }

About

Greeter gRPC API implementation in node.js

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%