Merge pull request #2634 from Spinny03/master

fix grpc-reflection README: rename import
This commit is contained in:
Michael Lumish 2023-12-14 14:25:03 -05:00 committed by GitHub
commit c5d35fe22d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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);
```