Files
ecom-dmb/apps/license-server/server/src/main.ts
T
2026-09-16 22:43:21 +08:00

18 lines
540 B
TypeScript

import { ValidationPipe } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.setGlobalPrefix('api');
app.useGlobalPipes(
new ValidationPipe({ whitelist: true, transform: true, forbidNonWhitelisted: true }),
);
app.enableCors();
const port = process.env.PORT || 3100;
await app.listen(port);
console.log(`Ecom License Server running on http://localhost:${port}`);
}
bootstrap();