From c59cb8bd54f69e326a8075899c009ebdbc37b6af Mon Sep 17 00:00:00 2001 From: Jonas Date: Sun, 28 Apr 2024 20:47:34 +0200 Subject: [PATCH] chore: Housekeeping --- apps/backend/src/app/app.module.ts | 1 - apps/backend/src/app/config/validation.ts | 1 - apps/backend/src/main.ts | 10 ++++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/backend/src/app/app.module.ts b/apps/backend/src/app/app.module.ts index 937c7d94..634b08eb 100644 --- a/apps/backend/src/app/app.module.ts +++ b/apps/backend/src/app/app.module.ts @@ -4,7 +4,6 @@ import { ConfigModule } from '@nestjs/config'; /* Internal */ import { AppService } from './app.service'; import { AppController } from './app.controller'; - import { validateConfig } from './config/validation'; @Module({ diff --git a/apps/backend/src/app/config/validation.ts b/apps/backend/src/app/config/validation.ts index f2edd495..76480cc0 100644 --- a/apps/backend/src/app/config/validation.ts +++ b/apps/backend/src/app/config/validation.ts @@ -5,7 +5,6 @@ import { plainToClass, plainToInstance } from 'class-transformer'; /* classes */ import { EnvironmentVariables } from './classes/environment.class'; - /* Interfaces */ import { BackendConfig } from 'common-backend-models'; import { IEnvironmentVariables } from './interfaces/environment.interface'; diff --git a/apps/backend/src/main.ts b/apps/backend/src/main.ts index 621862bb..bcf18489 100644 --- a/apps/backend/src/main.ts +++ b/apps/backend/src/main.ts @@ -5,19 +5,21 @@ import { Logger } from '@nestjs/common'; import { NestFactory } from '@nestjs/core'; +import { ConfigService } from '@nestjs/config'; +/*Classes */ +import { BackendConfig } from 'common-backend-models'; +/* Modules */ import { AppModule } from './app/app.module'; -import { ConfigService } from '@nestjs/config'; -import { AppConfig, BackendConfig } from 'common-backend-models'; async function bootstrap() { const app = await NestFactory.create(AppModule); - const configService = app.get(ConfigService); + const configService = app.get(ConfigService); const globalPrefix = 'api'; app.setGlobalPrefix(globalPrefix); - const port = configService.get('app', { infer: true }).port || 3333; + const port = configService.get('app', { infer: true }).port || 3333; await app.listen(port); Logger.log(`🚀 Application is running on: http://localhost:${port}/${globalPrefix}`); }