full project: admin panel, backend modules, docs
This commit is contained in:
+5
-1
@@ -1,10 +1,12 @@
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { ValidationPipe, Logger } from '@nestjs/common';
|
||||
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
|
||||
import { NestExpressApplication } from '@nestjs/platform-express';
|
||||
import { join } from 'path';
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
async function bootstrap() {
|
||||
const app = await NestFactory.create(AppModule);
|
||||
const app = await NestFactory.create<NestExpressApplication>(AppModule);
|
||||
const logger = new Logger('Bootstrap');
|
||||
|
||||
app.enableCors({
|
||||
@@ -16,6 +18,8 @@ async function bootstrap() {
|
||||
app.setGlobalPrefix('api/v1');
|
||||
app.useGlobalPipes(new ValidationPipe({ whitelist: true, transform: true }));
|
||||
|
||||
app.useStaticAssets(join(__dirname, '..', 'uploads'), { prefix: '/uploads' });
|
||||
|
||||
const config = new DocumentBuilder()
|
||||
.setTitle('ProsApp API')
|
||||
.setDescription('API de ProsApp - Migración Firebase a PostgreSQL')
|
||||
|
||||
Reference in New Issue
Block a user