|
@@ -8,6 +8,7 @@ import 'winston-daily-rotate-file';
|
|
|
import { join } from 'path';
|
|
|
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
|
|
|
import { TransformInterceptor } from './interceptor/transform/transform.interceptor';
|
|
|
+import { HttpExceptionFilter } from './interceptor/http-execption/http-execption.filter';
|
|
|
|
|
|
async function bootstrap() {
|
|
|
// const app = await NestFactory.create(AppModule);
|
|
@@ -41,6 +42,8 @@ async function bootstrap() {
|
|
|
await redisIoAdapter.connectToRedis();
|
|
|
app.useWebSocketAdapter(redisIoAdapter);
|
|
|
app.useGlobalInterceptors(new TransformInterceptor());
|
|
|
+ app.useGlobalFilters(new HttpExceptionFilter());
|
|
|
+ app.setGlobalPrefix('daikan');
|
|
|
const config = new DocumentBuilder()
|
|
|
.setTitle('带看socket API')
|
|
|
.setDescription('带看api文档')
|