feat: add nestjs app (#172)
This commit is contained in:
1 parent
7f2ab7f192
commit
9440d04261
16 files changed
+2181
-181
No files matched your search
@@ -0,0 +1,27 @@
|
||||
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,
|
||||
});
|
||||
Reference in new issue
Block a user