socket.io server init

* Make Hocuspocus collaboration websocket server (wsAdapter) work with socket.io
* Create database module for TypeOrm
This commit is contained in:
Philipinho
2023-10-16 15:19:30 +01:00
parent 60fcf99e6e
commit 2e9969d590
9 changed files with 99 additions and 26 deletions
+1 -2
View File
@@ -6,7 +6,6 @@ import {
} from '@nestjs/platform-fastify';
import { ValidationPipe } from '@nestjs/common';
import { TransformHttpResponseInterceptor } from './interceptors/http-response.interceptor';
import { WsAdapter } from '@nestjs/platform-ws';
async function bootstrap() {
const app = await NestFactory.create<NestFastifyApplication>(
@@ -26,7 +25,7 @@ async function bootstrap() {
app.enableCors();
app.useGlobalInterceptors(new TransformHttpResponseInterceptor());
app.useWebSocketAdapter(new WsAdapter(app));
app.enableShutdownHooks();
await app.listen(process.env.PORT || 3001);
}