We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents dd0a083 + b1026af commit 82db495Copy full SHA for 82db495
content/websockets/gateways.md
@@ -53,6 +53,19 @@ handleEvent(data) {
53
54
> info **Hint** `@SubscribeMessage()` and `@MessageBody()` decorators are imported from `@nestjs/websockets` package.
55
56
+Once the gateway is created, we can register it in our module.
57
+
58
+```typescript
59
+import { Module } from '@nestjs/common';
60
+import { EventsGateway } from './events.gateway';
61
62
+@@filename(events.module)
63
+@Module({
64
+ providers: [EventsGateway]
65
+})
66
+export class EventsModule {}
67
+```
68
69
You can also pass in a property key to the decorator to extract it from the incoming message body:
70
71
```typescript
0 commit comments