import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; import { ConfigService } from '@nestjs/config'; async function bootstrap() { const app = await NestFactory.create(AppModule); const configService = app.get(ConfigService); const port = configService.get('app.port', 3000); app.setGlobalPrefix('api/v1'); await app.listen(port); console.log(`✅ P'titsPas API is running on: ${await app.getUrl()}`); } bootstrap().catch((err) => { console.error('❌ Error starting the application:', err); process.exit(1); });