Initial commit: NestJS NextJS pnpm monorepo

This commit is contained in:
Marco_205 committed 2026-10-12 07:20:37 +00:00
commit 610dcf202b
175 files changed
+25172

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
import {
WebSocketGateway,
SubscribeMessage,
MessageBody,
WebSocketServer,
} from '@nestjs/websockets';
import { Server } from 'socket.io';
@WebSocketGateway({
cors: {
origin: 'http://192.168.50.205',
},
})
export class ChatGateway {
@WebSocketServer()
server: Server; // 👈 DAS fehlt dir gerade
@SubscribeMessage('message')
handleMessage(@MessageBody() data: string) {
console.log('msg:', data);
this.server.emit('message', data);
}
}