wip divide chat.svelte into pieces
This commit is contained in:
@@ -34,7 +34,7 @@ import { ChatGateway } from './chat/chat.gateway';
|
||||
controllers: [AppController],
|
||||
providers: [
|
||||
AppService,
|
||||
ChatGateway,
|
||||
ChatGateway,
|
||||
],
|
||||
})
|
||||
export class AppModule {}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user