mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-20 04:01:24 +02:00
Move these apps to apps-archived/ as they are not actively developed: - inventory: Inventory management app - presi: Presentation tool - storage: Cloud storage app These can be reactivated by moving back to apps/ when needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
37 lines
933 B
TypeScript
37 lines
933 B
TypeScript
import { NestFactory } from '@nestjs/core';
|
|
import { ValidationPipe } from '@nestjs/common';
|
|
import { ConfigService } from '@nestjs/config';
|
|
import { AppModule } from './app.module';
|
|
import * as dotenv from 'dotenv';
|
|
|
|
dotenv.config();
|
|
|
|
async function bootstrap() {
|
|
const app = await NestFactory.create(AppModule);
|
|
|
|
const configService = app.get(ConfigService);
|
|
const port = configService.get<number>('PORT') || 3020;
|
|
const corsOrigins =
|
|
configService.get<string>('CORS_ORIGINS') ||
|
|
'http://localhost:5173,http://localhost:5188,http://localhost:8081';
|
|
|
|
app.enableCors({
|
|
origin: corsOrigins.split(',').map((o) => o.trim()),
|
|
credentials: true,
|
|
});
|
|
|
|
app.useGlobalPipes(
|
|
new ValidationPipe({
|
|
whitelist: true,
|
|
transform: true,
|
|
transformOptions: {
|
|
enableImplicitConversion: true,
|
|
},
|
|
})
|
|
);
|
|
|
|
await app.listen(port);
|
|
console.log(`[Inventory Backend] Running on http://localhost:${port}`);
|
|
}
|
|
|
|
bootstrap();
|