Installation
npm install grpc-server-ts --save
protobuf
hello.proto
syntax = "proto3"; option java_multiple_files = true;option java_package = "io.grpc.service.test";option objc_class_prefix ="RTG"; package hello; service Hello { rpc say(stream Empty) returns (stream Word) {};} message Empty { } message Word { string word = 1;}
define a service
;
registry service grpc
; RPC.start;
settings
port: "3333" // listen port host: "localhost" // listen host ca: "runtime/rpc/ca.crt" // ca file path cert: "runtime/rpc/server.crt" // cert file path key: "runtime/rpc/server.key" // key file path