Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

grpc-tools

Package Overview
Dependencies
Maintainers
2
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grpc-tools

Tools for developing with gRPC on Node.js

  • 1.12.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
219K
increased by5.07%
Maintainers
2
Weekly downloads
 
Created

What is grpc-tools?

The grpc-tools npm package provides tools for working with gRPC, including compiling Protocol Buffers (protobuf) files and generating gRPC service code. It is particularly useful for setting up gRPC services and clients in Node.js applications.

What are grpc-tools's main functionalities?

Compile Protobuf Files

This feature allows you to compile Protocol Buffers (protobuf) files into JavaScript code. The generated code can then be used to create gRPC clients and servers.

const grpc_tools_node_protoc = require('grpc-tools');
const execSync = require('child_process').execSync;

execSync(
  'grpc_tools_node_protoc --js_out=import_style=commonjs,binary:. --grpc_out=. -I ./protos ./protos/helloworld.proto'
);

Generate gRPC Service Code

This feature generates the gRPC service code from protobuf definitions. The generated code includes both client and server stubs, which can be used to implement gRPC services.

const grpc_tools_node_protoc = require('grpc-tools');
const execSync = require('child_process').execSync;

execSync(
  'grpc_tools_node_protoc --plugin=protoc-gen-grpc=`which grpc_tools_node_protoc_plugin` --grpc_out=. -I ./protos ./protos/helloworld.proto'
);

Other packages similar to grpc-tools

FAQs

Package last updated on 31 Jan 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc