Main
Main
dotenv.config();
app.setGlobalPrefix('data');
app.enableCors({
origin: ["http://localhost:5173", "http://localhost:3000",
"http://localhost:5174"],
methods: ['GET', 'HEAD', 'PUT', 'PATCH', 'POST', 'DELETE'],
allowedHeaders: ['Content-Type', 'Authorization', 'ngrok-skip-browser-
warning'],
credentials: true,
});
app.use(
bodyParser.json({ limit: '50mb' }),
bodyParser.urlencoded({ limit: '50mb', extended: true }),
);
app.use(cookieParser());
// Swagger setup
const config = new DocumentBuilder()
.setTitle('API Documentation')
.setDescription('The API description for our NestJS app')
.setVersion('1.0')
.addTag('Users')
.addTag('Invitation')
.build();
bootstrap();