|
|
|
@ -4,15 +4,23 @@ import { |
|
|
|
|
FastifyAdapter, |
|
|
|
|
NestFastifyApplication, |
|
|
|
|
} from '@nestjs/platform-fastify'; |
|
|
|
|
// 参数验证
|
|
|
|
|
import { ValidationPipe } from '@nestjs/common'; |
|
|
|
|
// Fastify文件上传插件
|
|
|
|
|
import fastifyMultipart from '@fastify/multipart'; |
|
|
|
|
// 日志服务
|
|
|
|
|
import { GloggerService } from './Gservice/GLOGGER/glogger.service'; |
|
|
|
|
// API文档
|
|
|
|
|
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'; |
|
|
|
|
import * as process from 'process'; |
|
|
|
|
import { GdevinterceptorInterceptor } from './Ginterceptor/gdevinterceptor.interceptor'; |
|
|
|
|
// 配置文件
|
|
|
|
|
import { ConfigService } from '@nestjs/config'; |
|
|
|
|
import { GresponseinterceptorInterceptor } from './Ginterceptor/gresponseinterceptor.interceptor'; |
|
|
|
|
// 异常捕获
|
|
|
|
|
import { GexceptionsfilterFilter } from './Gexceptions/gexceptionsfilter.filter'; |
|
|
|
|
// 拦截器
|
|
|
|
|
// --全局开发拦截
|
|
|
|
|
import { GdevinterceptorInterceptor } from './Ginterceptor/gdevinterceptor.interceptor'; |
|
|
|
|
// --全局响应拦截
|
|
|
|
|
import { GresponseinterceptorInterceptor } from './Ginterceptor/gresponseinterceptor.interceptor'; |
|
|
|
|
|
|
|
|
|
async function bootstrap() { |
|
|
|
|
const app = await NestFactory.create<NestFastifyApplication>( |
|
|
|
|