mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-25 13:24:39 +02:00
Wire up event-parser and event-estimator into the QuickEventOverlay title input. Typing natural language like "Meeting morgen 14 Uhr 1h @Arbeit" now shows a live parse preview, duration estimation from history, and conflict warnings. On submit, parsed values auto-fill form fields (date, time, calendar, location, recurrence, all-day). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
40 lines
1,013 B
TypeScript
40 lines
1,013 B
TypeScript
import { NestFactory } from '@nestjs/core';
|
|
import { ValidationPipe } from '@nestjs/common';
|
|
import { AppModule } from './app.module';
|
|
|
|
async function bootstrap() {
|
|
const app = await NestFactory.create(AppModule);
|
|
|
|
// Enable CORS for mobile and web apps
|
|
const corsOrigins = process.env.CORS_ORIGINS?.split(',').map((origin) => origin.trim()) || [
|
|
'http://localhost:3000',
|
|
'http://localhost:5173',
|
|
'http://localhost:5182',
|
|
'http://localhost:8081',
|
|
'exp://localhost:8081',
|
|
'http://localhost:3001',
|
|
];
|
|
|
|
app.enableCors({
|
|
origin: corsOrigins,
|
|
methods: ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],
|
|
credentials: true,
|
|
});
|
|
|
|
// Enable validation
|
|
app.useGlobalPipes(
|
|
new ValidationPipe({
|
|
whitelist: true,
|
|
transform: true,
|
|
forbidNonWhitelisted: true,
|
|
})
|
|
);
|
|
|
|
// Set global prefix for API routes
|
|
app.setGlobalPrefix('api/v1');
|
|
|
|
const port = process.env.PORT || 3012;
|
|
await app.listen(port);
|
|
console.log(`Moods backend running on http://localhost:${port}`);
|
|
}
|
|
bootstrap();
|