An example
Install grpcnode:
npm i -g grpcnode
You can start a quick “Star Friends” server, from the example repo:
git clone https://github.com/backstopmedia/gRPC-book-example.git
cd
gRPC-book-example/examples/nodejs
npm i
npm start
You can use it to get a list of available RPCs, based on the proto:
grpcnode client ls -I ../../proto sfapi.proto
You can run the GetPerson
RPC by JSON-encoding your request:
grpcnode client run -I ../../proto sfapi.proto -c '/sfapi.v1.Starfriends/GetPerson({"id":"SyAbJp35ViM"})'
There is also a HTTP/JSON gateway running https://github.com/konsumer/grpc-dynamic-gateway, so you can use your favorite way of messing with JSON-servers (curl, postman, etc.).