diff --git a/src/main.ts b/src/main.ts index ebd53e5906d44738a4775716b7165108fae426ca..e0a6253c9fd220b51ad454ebdd3c2012db3201e8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -1,4 +1,6 @@ import { NestFactory } from '@nestjs/core'; +import { NestExpressApplication } from '@nestjs/platform-express'; +import { join } from 'path'; import { AppModule } from './app.module'; @@ -7,9 +9,10 @@ import { AppModule } from './app.module'; */ async function bootstrap() { - const app = await NestFactory.create(AppModule); + const app = await NestFactory.create<NestExpressApplication>(AppModule); // Cors is needed for application/json POST app.enableCors(); + app.useStaticAssets(join(__dirname, '..', 'images')); await app.listen(5000); } bootstrap();