role perms
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user