import { IoAdapter } from '@nestjs/platform-socket.io';

export class SocketIoAdapter extends IoAdapter {
  createIOServer(port: number, options?: any): any {
    const cors = {
      origin: '*',
      methods: ['GET', 'POST'],
      credentials: true,
    };
    return super.createIOServer(port, { ...options, cors });
  }
}
