Have ideas to improve npm?Join in the discussion! »

    grpc-reflection-js
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.1 • Public • Published

    gRPC Reflection JS

    npm version CI codecov

    A JS library for talking with any gRPC Server that implements Reflection protocol.

    Installation

    npm install grpc-reflection-js

    Usage

    Initialize

    const grpc = require('grpc');
    const grpcReflection = require('grpc-reflection-js');
    
    const grpcReflectionServer = '<gRPC Reflection server host>'
    const reflectionClient = new grpcReflection.Client(
      grpcReflectionServer,
      grpc.credentials.createInsecure()
    );

    listServices

    const services = await reflectionClient.listServices()

    Output

    ['grpc.reflection.v1alpha.ServerReflection', 'phone.Messenger']
    

    fileContainingSymbol

    const root = await reflectionClient.fileContainingSymbol('phone.Messenger')

    fileByFilename

    const root = await reflectionClient.fileContainingSymbol('contact.proto')

    License

    GitHub license

    MIT

    Keywords

    Install

    npm i grpc-reflection-js

    DownloadsWeekly Downloads

    1,005

    Version

    0.1.1

    License

    MIT

    Unpacked Size

    161 kB

    Total Files

    24

    Last publish

    Collaborators

    • avatar