grpc-tools

Tools for developing with gRPC on Node.js

grpc-tools

This package distributes the Protocol Buffers compiler protocalong with the plugin for generating client and service objects for use with the Node gRPC libraries.

Usage

This library exports the grpc_tools_node_protocexecutable, which accepts all of the same arguments as protocitself. For use with Node, you most likely want to use CommonJS-style imports. An example of generating code this way can be found in this guide. The grpc_tools_node_protocautomatically includes the Node gRPC plugin, so it also accepts the --grpc_out=[option:]pathargument. The option can be one of the following:

  • grpc_js: Generates code with require('@grpc/grpc-js')instead of require('grpc')
  • generate_package_definition: Generates code that does not requireany gRPC library, and instead generates PackageDefinitionobjects that can be passed to the loadPackageDefinitionfunction provided by both the grpcand @grpc/grpc-jslibraries.

HomePage

https://grpc.io/

Repository

https://github.com/grpc/grpc-node.git


上一篇:mocha-spec-json-output-reporter
下一篇:mock-xmlhttprequest

相关推荐

官方社区

扫码加入 JavaScript 社区