diff --git a/src/main.ts b/src/main.ts index 01e35e066..c0aa21052 100644 --- a/src/main.ts +++ b/src/main.ts @@ -5,9 +5,10 @@ import { AppModule } from './app.module'; import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger'; import { promises } from 'fs'; import { join } from 'path'; +import { NestExpressApplication } from '@nestjs/platform-express'; async function bootstrap() { - const app = await NestFactory.create(AppModule); + const app = await NestFactory.create(AppModule); app.useGlobalPipes(new ValidationPipe()); app.use(helmet()); @@ -23,6 +24,7 @@ async function bootstrap() { .build(); const document = SwaggerModule.createDocument(app, options); SwaggerModule.setup('api', app, document); + app.useStaticAssets(join(__dirname, '..', 'static')); await app.listen(3000); }