feat(server/machine-learning): Configurable port (#1386)

* feat(server/machine-learning): Configurable port

* feat(server/machine-learning): Address PR comments.

* feat(server/machine-learning): Simplify

Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
Skyler Mäntysaari
2023-01-24 06:18:35 +02:00
committed by GitHub
parent b7d34079d9
commit 9d337bf4dc
4 changed files with 18 additions and 5 deletions

View File

@@ -5,7 +5,9 @@ import { Logger } from '@nestjs/common';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
await app.listen(3003, () => {
const port = Number(process.env.MACHINE_LEARNING_PORT) || 3003;
await app.listen(port, () => {
if (process.env.NODE_ENV == 'development') {
Logger.log(
'Running Immich Machine Learning in DEVELOPMENT environment',