I had read this answer: https://mcmap.net/q/1326468/-can-grpc-and-express-server-run-by-same-nodejs-server-or-grpc-has-to-be-different-server, it says that there is no way to run gRPC server and HTTP server at same address and port using grpc-node
package.
But I can create gRPC server and HTTP server at same address and port(e.g. both using localhost:3000
) using grpc-go
package. Here is an example: https://github.com/mrdulin/grpc-go-cnode/blob/master/cmd/server/main.go#L79
So, why grpc-node and grpc-go behave inconsistently. Does this make sense?
The result I expect is that no matter what language is implemented in grpc, the behavior should be consistent. So the grpc server should be able to share the same port with the server created by Node
's standard library http in same system process.