17 lines
480 B
TypeScript
17 lines
480 B
TypeScript
import "reflect-metadata";
|
|
import { NestFactory } from "@nestjs/core";
|
|
import { ValidationPipe } from "@nestjs/common";
|
|
import { AppModule } from "./app.module";
|
|
import { loadSettings } from "./config";
|
|
|
|
async function bootstrap() {
|
|
const settings = loadSettings();
|
|
const app = await NestFactory.create(AppModule);
|
|
app.useGlobalPipes(
|
|
new ValidationPipe({ whitelist: true, forbidNonWhitelisted: true })
|
|
);
|
|
await app.listen(settings.port, "0.0.0.0");
|
|
}
|
|
|
|
bootstrap();
|