Files
homarr/apps/nestjs/src/main.ts
2024-03-03 21:07:27 +01:00

28 lines
661 B
TypeScript

import { NestFactory } from "@nestjs/core";
import { WinstonModule } from "nest-winston";
import { logger } from "@homarr/log";
import { AppModule } from "./app.module";
const winstonLoggerModule = WinstonModule.createLogger({
instance: logger,
});
async function bootstrap() {
const app = await NestFactory.create(AppModule, {
logger: winstonLoggerModule,
});
await app.listen(3100);
}
// @ts-expect-error this has no type yet
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
if (import.meta.env.PROD) {
void bootstrap();
}
export const viteNodeApp = NestFactory.create(AppModule, {
logger: winstonLoggerModule,
});