19 lines
567 B
TypeScript
19 lines
567 B
TypeScript
import "reflect-metadata";
|
|
import "tsconfig-paths/register";
|
|
import { NestFactory } from "@nestjs/core";
|
|
import { Logger } from "@nestjs/common";
|
|
import { AppModule } from "./app.module";
|
|
import { loadConfig } from "./config/env";
|
|
|
|
async function bootstrap() {
|
|
const config = loadConfig();
|
|
const app = await NestFactory.create(AppModule, {
|
|
logger: ["log", "warn", "error"],
|
|
});
|
|
app.enableCors({ origin: true, credentials: false });
|
|
await app.listen(config.PORT);
|
|
Logger.log(`ordinarthur-os api ready on :${config.PORT}`, "Bootstrap");
|
|
}
|
|
|
|
bootstrap();
|