From f8a1f9567af381b570b5391ebf93b8d18b33c62e Mon Sep 17 00:00:00 2001 From: mertmit Date: Fri, 28 Apr 2023 15:50:19 +0300 Subject: [PATCH] fix: pass servers to nestJS on initialization Signed-off-by: mertmit --- packages/nocodb-nest/src/Noco.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/nocodb-nest/src/Noco.ts b/packages/nocodb-nest/src/Noco.ts index a86f260f9a..bc9f5dfef3 100644 --- a/packages/nocodb-nest/src/Noco.ts +++ b/packages/nocodb-nest/src/Noco.ts @@ -3,6 +3,7 @@ import { NestFactory } from '@nestjs/core'; import clear from 'clear'; import * as express from 'express'; import NcToolGui from 'nc-lib-gui'; +import { IoAdapter } from '@nestjs/platform-socket.io'; import { AppModule } from './app.module'; import { NC_LICENSE_KEY } from './constants'; @@ -96,6 +97,9 @@ export default class Noco { this._server = server; const nestApp = await NestFactory.create(AppModule); + + nestApp.useWebSocketAdapter(new IoAdapter(httpServer)); + nestApp.use( express.json({ limit: process.env.NC_REQUEST_BODY_SIZE || '50mb' }), );