fix README

This commit is contained in:
Filippo Spinella 2023-12-14 18:56:05 +01:00
parent 7eb9f42af5
commit bda01f97f4
1 changed files with 2 additions and 2 deletions

View File

@ -21,12 +21,12 @@ npm install @grpc/reflection
Any gRPC-node server can use `@grpc/reflection` to expose reflection information about their gRPC API.
```typescript
import { ReflectionServer } from '@grpc/reflection';
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 ReflectionServer(pkg);
const reflection = new ReflectionService(pkg);
reflection.addToServer(server);
```