* integrate websocket redis adapter
* use APP_SECRET for jwt signing
* auto migrate database on startup in production
* add updatedAt to update db operations
* create enterprise ee package directory
* fix comment editor focus
* other fixes
This commit is contained in:
Philipinho
2024-06-07 17:29:34 +01:00
parent eef9081aaf
commit 38ef610e5e
36 changed files with 541 additions and 166 deletions

View File

@ -7,6 +7,8 @@ import {
import { NotFoundException, ValidationPipe } from '@nestjs/common';
import { TransformHttpResponseInterceptor } from './interceptors/http-response.interceptor';
import fastifyMultipart from '@fastify/multipart';
import { WsRedisIoAdapter } from './ws/adapter/ws-redis.adapter';
import { InternalLogFilter } from './integrations/logger/internal-log-filter';
async function bootstrap() {
const app = await NestFactory.create<NestFastifyApplication>(
@ -15,10 +17,18 @@ async function bootstrap() {
ignoreTrailingSlash: true,
ignoreDuplicateSlashes: true,
}),
{
logger: new InternalLogFilter(),
},
);
app.setGlobalPrefix('api');
const redisIoAdapter = new WsRedisIoAdapter(app);
await redisIoAdapter.connectToRedis();
app.useWebSocketAdapter(redisIoAdapter);
await app.register(fastifyMultipart);
app
@ -50,7 +60,7 @@ async function bootstrap() {
app.useGlobalInterceptors(new TransformHttpResponseInterceptor());
app.enableShutdownHooks();
await app.listen(process.env.PORT || 3000);
await app.listen(process.env.PORT || 3000, '0.0.0.0');
}
bootstrap();