import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
// import { WsAdapter } from '@nestjs/platform-ws';
import { WsAdapter } from './ws-adapter';
import { Logger } from '@nestjs/common';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);
  app.enableCors();
  app.useWebSocketAdapter(new WsAdapter(app));

  await app.listen(3100, '0.0.0.0', function () {
    const logger = new Logger('bootstrap');
    logger.log('listening on port 3100');
  });
}
bootstrap();
