Add port env variable (#19)

This commit is contained in:
Manuel 2022-12-21 08:35:48 +01:00 committed by GitHub
parent 46aa88e9b3
commit 4fc81e2b7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -22,6 +22,7 @@ import { UpdatesModule } from './updates/updates.module';
JELLYFIN_AUTHENTICATION_USERNAME: Joi.string().required(), JELLYFIN_AUTHENTICATION_USERNAME: Joi.string().required(),
JELLYFIN_AUTHENTICATION_PASSWORD: Joi.string().required(), JELLYFIN_AUTHENTICATION_PASSWORD: Joi.string().required(),
UPDATER_DISABLE_NOTIFICATIONS: Joi.boolean(), UPDATER_DISABLE_NOTIFICATIONS: Joi.boolean(),
PORT: Joi.number().min(1),
}), }),
}), }),
ScheduleModule.forRoot(), ScheduleModule.forRoot(),

View File

@ -4,6 +4,6 @@ import { AppModule } from './app.module';
async function bootstrap() { async function bootstrap() {
const app = await NestFactory.create(AppModule); const app = await NestFactory.create(AppModule);
app.enableShutdownHooks(); app.enableShutdownHooks();
await app.listen(3000); await app.listen(process.env.PORT || 3000);
} }
bootstrap(); bootstrap();