mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-23 23:19:19 +08:00
18 lines
540 B
TypeScript
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();
|