"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const core_1 = require("@nestjs/core"); const common_1 = require("@nestjs/common"); const swagger_1 = require("@nestjs/swagger"); const app_module_1 = require("./app.module"); const compression = require("compression"); const helmet = require("helmet"); async function bootstrap() { const app = await core_1.NestFactory.create(app_module_1.AppModule); app.use(helmet.default()); app.use(compression()); app.enableCors({ origin: process.env.CORS_ORIGIN || 'http://localhost:3000', credentials: true, }); app.useGlobalPipes(new common_1.ValidationPipe({ whitelist: true, forbidNonWhitelisted: true, transform: true, })); app.setGlobalPrefix('api'); const config = new swagger_1.DocumentBuilder() .setTitle('Smart Parking Finder API') .setDescription('API for finding and navigating to parking lots') .setVersion('1.0') .addBearerAuth() .build(); const document = swagger_1.SwaggerModule.createDocument(app, config); swagger_1.SwaggerModule.setup('api/docs', app, document); const port = process.env.PORT || 3001; await app.listen(port); console.log(`🚀 Application is running on: http://localhost:${port}`); console.log(`📚 API Documentation: http://localhost:${port}/api/docs`); } bootstrap(); //# sourceMappingURL=main.js.map