2025-02-23 18:23:03 +03:00

14 lines
423 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.setGlobalPrefix('api'); // Все маршруты будут начинаться с `/api`
app.enableCors(); // Разрешаем CORS
await app.listen(3000);
console.log('🚀 Server running on http://localhost:3000/api');
}
bootstrap();