role perms

This commit is contained in:
2025-11-12 09:28:56 +03:30
parent 046286b559
commit 440c3721ce
31 changed files with 488 additions and 98 deletions
+9
View File
@@ -7,6 +7,9 @@ import multipart from '@fastify/multipart';
// 👈 Import the Fastify application type
import { type NestFastifyApplication, FastifyAdapter } from '@nestjs/platform-fastify';
import { HttpExceptionFilter } from './core/exceptions/http.exceptions';
import { ResponseInterceptor } from './core/interceptors/response.interceptor';
// import { PaginationInterceptor } from './core/interceptors/pagination.interceptor';
async function bootstrap() {
const logger = new Logger('APP');
@@ -22,6 +25,12 @@ async function bootstrap() {
await app.register(multipart);
app.useGlobalPipes(new ValidationPipe());
app.useGlobalInterceptors(
new ResponseInterceptor(),
// , new PaginationInterceptor()
);
app.useGlobalFilters(new HttpExceptionFilter());
const configService = app.get<ConfigService>(ConfigService);
// Ensure the port is handled correctly, use 4000 as fallback if needed
const APP_PORT = configService.getOrThrow<number>('APP_PORT') ?? 4000;