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

@grpc/reflection

Package Overview
Dependencies
Maintainers
3
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@grpc/reflection

Reflection API service for use with gRPC-node

  • 1.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
29K
decreased by-8.55%
Maintainers
3
Weekly downloads
 
Created
Source

gRPC Reflection

gRPC reflection API service for use with gRPC-node.

Background

This package provides an implementation of the gRPC Server Reflection Protocol service which can be added to an existing gRPC server. Adding this service to your server will allow clients such as postman to dynamically load the API specification from your running application rather than needing to pass around and load proto files manually.

example of reflection working with postman

Installation

Use the package manager npm to install @grpc/reflection.

npm install @grpc/reflection

Usage

Any gRPC-node server can use @grpc/reflection to expose reflection information about their gRPC API.

import { ReflectionService } from '@grpc/reflection';

const pkg = protoLoader.load(...); // Load your gRPC package definition as normal

// Create the reflection implementation based on your gRPC package and add it to your existing server
const reflection = new ReflectionService(pkg);
reflection.addToServer(server);

Congrats! Your server now allows any client to request reflection information about its API.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. The original proposal for this library can be found in gRFC L108

Please make sure to update tests as appropriate.

License

Apache License 2.0

FAQs

Package last updated on 01 May 2024

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