Add @nestjs/serve-static dependency and update file paths for banner uploads; remove unused form utility files
This commit is contained in:
+8
-1
@@ -3,9 +3,11 @@ import { AppModule } from './app.module';
|
||||
import { ValidationPipe } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
|
||||
import { NestExpressApplication } from '@nestjs/platform-express';
|
||||
import { join } from 'path';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
const app = await NestFactory.create<NestExpressApplication>(AppModule);
|
||||
const configService = app.get(ConfigService);
|
||||
|
||||
// Configuración de validación global
|
||||
@@ -17,6 +19,11 @@ async function bootstrap() {
|
||||
}),
|
||||
);
|
||||
|
||||
app.useStaticAssets(join(__dirname, '..', 'uploads'), {
|
||||
index: false,
|
||||
prefix: '/',
|
||||
});
|
||||
|
||||
// CORS configuration
|
||||
app.enableCors({
|
||||
origin: '*',
|
||||
|
||||
Reference in New Issue
Block a user