ba me oi con thanh cong roi

This commit is contained in:
2024-10-14 23:05:35 +07:00
parent 76ff5d28ac
commit 0ac5868d2d
18 changed files with 365 additions and 138 deletions

View File

@@ -1,6 +1,7 @@
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
import graphqlUploadExpress from 'graphql-upload/graphqlUploadExpress.js';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
@@ -40,6 +41,14 @@ async function bootstrap() {
},
};
// graphql upload
app.use(
graphqlUploadExpress({
maxFileSize: 100 * 1024 * 1024, // 100 MB
maxFiles: 10,
}),
);
const port = process.env.LISTEN_PORT ?? 3000; // Default to 3000 if LISTEN_PORT is not set
await app.listen(port);
}