Helloworld example to learn gRPC, with Node.js + Typescript on the client and Golang on the server, secure gRPC connection with SSL/TLS.
Protoc plugin for TypeScript: ts-proto
-
Clone the repository:
git clone [email protected]:AnhBigBrother/go-node-gRPC.git
-
Gen proto, certificate & install dependencies:
make setup
-
Run server:
make server
-
Run client(on another terminal):
cd client npx ts-node main.ts [cmd] [your_message_to_server] # Avaiable cmd: say_hello, stream_reply, stream_request, bidirection_stream # Example: npx ts-node main.ts --cmd=stream_request 'Hello from me'