mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-22 21:26:41 +02:00
- 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>
37 lines
883 B
TypeScript
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();
|