managarten/games/mana-games/apps/backend/src/main.ts
Wuesteon 0ebfde0851 fix(ci): build shared packages before tests and fix formatting
- Add build:packages step to all test.yml jobs (fixes @manacore/shared-nestjs-auth not found)
- Handle missing coverage artifacts gracefully in test-coverage.yml
- Update .prettierignore to exclude apps-archived/ and problematic files
- Format all source files to pass CI checks

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-01 23:15:00 +01:00

37 lines
883 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);
// CORS configuration
app.enableCors({
origin: [
'http://localhost:4321', // Astro dev
'http://localhost:3000', // Alternative dev
/\.netlify\.app$/, // Legacy Netlify
],
methods: ['GET', 'POST', 'OPTIONS'],
credentials: false,
});
app.setGlobalPrefix('api');
app.useGlobalPipes(
new ValidationPipe({
whitelist: true,
transform: true,
forbidNonWhitelisted: true,
})
);
const port = process.env.PORT || 3010;
// Increase timeout for long-running AI requests (2 minutes)
const server = await app.listen(port);
server.setTimeout(120000);
console.log(`Mana Games backend running on http://localhost:${port}`);
}
bootstrap();