From 4fc81e2b7c9c6243798f705c61058bf048e999ff Mon Sep 17 00:00:00 2001 From: Manuel <30572287+manuel-rw@users.noreply.github.com> Date: Wed, 21 Dec 2022 08:35:48 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20port=20env=20variable=20(#19)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.module.ts | 1 + src/main.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app.module.ts b/src/app.module.ts index d36a401..14fdec6 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -22,6 +22,7 @@ import { UpdatesModule } from './updates/updates.module'; JELLYFIN_AUTHENTICATION_USERNAME: Joi.string().required(), JELLYFIN_AUTHENTICATION_PASSWORD: Joi.string().required(), UPDATER_DISABLE_NOTIFICATIONS: Joi.boolean(), + PORT: Joi.number().min(1), }), }), ScheduleModule.forRoot(), diff --git a/src/main.ts b/src/main.ts index 4c1b409..e65c8db 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,6 +4,6 @@ import { AppModule } from './app.module'; async function bootstrap() { const app = await NestFactory.create(AppModule); app.enableShutdownHooks(); - await app.listen(3000); + await app.listen(process.env.PORT || 3000); } bootstrap();