Skip to content

Commit 9e07266

Browse files
committed
fix: add IoAdapter
1 parent 8c94a83 commit 9e07266

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

apps/api-gateway/src/main.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import cookieParser from 'cookie-parser';
66
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
77
import { ConfigService } from '@nestjs/config';
88
import { Configuration } from '@leetcode/config';
9+
import { IoAdapter } from '@nestjs/platform-socket.io';
910

1011
declare global {
1112
namespace Express {
@@ -49,6 +50,7 @@ async function bootstrap() {
4950
preflightContinue: false,
5051
optionsSuccessStatus: 204,
5152
});
53+
app.useWebSocketAdapter(new IoAdapter(app));
5254

5355
app.setGlobalPrefix('api', {
5456
exclude: [{ path: 'metrics', method: RequestMethod.GET }],

0 commit comments

Comments
 (0)