2.0.10 • Published 2 months ago

nice-grpc-server-reflection v2.0.10

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

nice-grpc-server-reflection npm version

Server Reflection for nice-grpc.

Allows to use tools like grpcurl without the need to pass .proto files.

Installation

npm install nice-grpc-server-reflection

Usage

Add the following flags to protoc command:

--descriptor_set_out=path/to/protoset.bin --include_imports

Add ServerReflection service implementation to gRPC server:

import {createServer} from 'nice-grpc';
import {
  ServerReflectionService,
  ServerReflection,
} from 'nice-grpc-server-reflection';
import * as fs from 'fs';

const server = createServer();

// add our own service
server.add(MyService, myServiceImpl);

// add server reflection service
server.add(
  ServerReflectionService,
  ServerReflection(
    fs.readFileSync(path.join('path', 'to', 'protoset.bin')),
    // specify fully-qualified names of exposed services
    [MyService.fullName],
  ),
);
2.0.10

2 months ago

2.0.9

7 months ago

2.0.8

7 months ago

2.0.7

10 months ago

2.0.3

1 year ago

2.0.2

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.0.6

1 year ago

2.0.1

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

2.0.0

2 years ago

1.0.12

2 years ago

1.0.9

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.2

3 years ago

1.0.3

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.1.0-alpha.0

3 years ago