You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/microservices/grpc.md
+27-27Lines changed: 27 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,33 +50,6 @@ In the `nest-cli.json` file, we add the `assets` property that allows us to dist
50
50
}
51
51
```
52
52
53
-
#### gRPC Reflection
54
-
55
-
The [gRPC Server Reflection Specification](https://grpc.io/docs/guides/reflection/#overview) is a standard which allows gRPC clients to request details about the API that the server exposes, akin to exposing an OpenAPI document for a REST API. This can make working with developer debugging tools such as grpc-ui or postman significantly easier.
56
-
57
-
To add gRPC reflection support to your server, first install the required implementation package:
58
-
59
-
```bash
60
-
$ npm i --save @grpc/reflection
61
-
```
62
-
63
-
Then it can be hooked into the gRPC server using the `onLoadPackageDefinition` hook in your gRPC server options, as follows:
Now your server will respond to messages requesting API details using the reflection specification.
79
-
80
53
#### Options
81
54
82
55
The <strong>gRPC</strong> transporter options object exposes the properties described below.
@@ -366,6 +339,33 @@ Please note that this would require updating the `HeroesService` interface that
366
339
367
340
A working example is available [here](https://github.com/nestjs/nest/tree/master/sample/04-grpc).
368
341
342
+
#### gRPC Reflection
343
+
344
+
The [gRPC Server Reflection Specification](https://grpc.io/docs/guides/reflection/#overview) is a standard which allows gRPC clients to request details about the API that the server exposes, akin to exposing an OpenAPI document for a REST API. This can make working with developer debugging tools such as grpc-ui or postman significantly easier.
345
+
346
+
To add gRPC reflection support to your server, first install the required implementation package:
347
+
348
+
```bash
349
+
$ npm i --save @grpc/reflection
350
+
```
351
+
352
+
Then it can be hooked into the gRPC server using the `onLoadPackageDefinition` hook in your gRPC server options, as follows:
Now your server will respond to messages requesting API details using the reflection specification.
368
+
369
369
#### gRPC Streaming
370
370
371
371
gRPC on its own supports long-term live connections, conventionally known as `streams`. Streams are useful for cases such as Chatting, Observations or Chunk-data transfers. Find more details in the official documentation [here](https://grpc.io/docs/guides/concepts/).
0 commit comments