YoshiyukiKato / grpc-kit

Use grpc more simply on Node.js
45 stars 13 forks source link

Expose gRPC Server Port #9

Open caedwil opened 4 years ago

caedwil commented 4 years ago

Captures and exposes the result of making the call to grpc.Server.bind, so that users can check on which port the server is listening.

The driving force behind this change is that it's possible to specify a port number of 0 when creating a server. This causes grpc to generate a random free port number, which it returns as the result of calling grpc.Server.bind. In order to know what port number it chose, we need to capture this return value.