|
@@ -7,6 +7,7 @@ import * as winston from 'winston';
|
|
|
import 'winston-daily-rotate-file';
|
|
|
import { join } from 'path';
|
|
|
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
|
|
|
+import { TransformInterceptor } from './interceptor/transform/transform.interceptor';
|
|
|
|
|
|
async function bootstrap() {
|
|
|
// const app = await NestFactory.create(AppModule);
|
|
@@ -39,7 +40,7 @@ async function bootstrap() {
|
|
|
const redisIoAdapter = new RedisIoAdapter(app);
|
|
|
await redisIoAdapter.connectToRedis();
|
|
|
app.useWebSocketAdapter(redisIoAdapter);
|
|
|
-
|
|
|
+ app.useGlobalInterceptors(new TransformInterceptor());
|
|
|
const config = new DocumentBuilder()
|
|
|
.setTitle('带看socket API')
|
|
|
.setDescription('带看api文档')
|