wip divide chat.svelte into pieces

This commit is contained in:
simplonco
2022-12-28 16:58:12 +01:00
11 changed files with 842 additions and 334 deletions

View File

@@ -34,7 +34,7 @@ import { ChatGateway } from './chat/chat.gateway';
controllers: [AppController],
providers: [
AppService,
ChatGateway,
ChatGateway,
],
})
export class AppModule {}

View File

@@ -9,30 +9,18 @@ import {
} from '@nestjs/websockets';
@WebSocketGateway({
path: '/chat',
path: '/api/v2/chat',
cors: {
origin: '*',
},
})
/*
export class ChatGateway {
*/
export class ChatGateway implements OnGatewayConnection {
@WebSocketServer()
server;
@WebSocketServer()
server;
handleConnection(client) {
console.log('------------------------ Client connected:', client.id);
}
/*
@SubscribeMessage('message')
handleMessage(@MessageBody() message: string): void {
console.log("message received:");
console.log(`[${message}]`);
this.server.emit('message', message);
}
*/
}