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.
1 parent b369245 commit d15b2fdCopy full SHA for d15b2fd
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 import it into our module.
57
+
58
+```typescript
59
+import { Module } from '@nestjs/common';
60
+import { EventsGatway } from './events.gateway';
61
62
+@@filename(events.module)
63
+@Module({
64
+ providers: [EventsGatway]
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