node
: This requires Node 0.12.x or greater.
$ # Get the gRPC repository
$ #Enter into the folder
$ npm install
There are two ways to generate the code needed to work with protocol buffers in Node.js - one approach uses Protobuf.js to dynamically generate the code at runtime, the other uses code statically generated using the protocol buffer compiler protoc
.
-
Run the server
$ # from this directory $ node server.js
-
Run the client
$ # from this directory $ node client.js