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

grpc-server-reflection

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grpc-server-reflection

gRPC server reflection for Node.js

  • 0.1.5
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
6K
decreased by-3.47%
Maintainers
1
Weekly downloads
 
Created
Source

grpc-server-reflection

gRPC server reflection for Node.js

Usage

Generate descriptor set

Generate descriptor set with grpc_tools_node_protoc using descriptor_set_out and include_imports, e.g.:

grpc_tools_node_protoc
    --descriptor_set_out=path/to/descriptor_set.bin
    --include_imports
    ./api/**/*.proto

Add reflection

import { Server } from '@grpc/grpc-js';
import { addReflection } from 'grpc-server-reflection'

const server = new Server()
addReflection(server, 'path/to/descriptor_set.bin')

Notes

  • Reflection can be added before or after registering other services
  • All services from descriptor set are available
  • Server reflection service is not included (unless added manually in the descriptor set)
  • Running tests requires grpc_cli

Thanks

This project is heavily inspired and ports some parts of code from nice-grpc-server-reflection. I respectfully burrowed some of the code based on encouragement from the author, to available solid server reflection for Node.js for general purpose. I tried to implement it myself but failed due to some incompatibilities with binary format in protobuf-js with the C++ implementation. Using descriptor sets avoids as in the referenced project avoids the issues.

See also

Here is a list and comparison with the similar projects:

packagefull support@grpc/grpc-js supportgrpc supportframework agnosticservice detection
grpc-server-reflection✅️✅️✅️✅️✅️
nice-grpc-server-reflection✅️✅️
grpc-node-server-reflection✅️
grpc-reflection-js✅️

License

MIT

Keywords

FAQs

Package last updated on 12 Jan 2022

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