mirror of
https://github.com/immich-app/immich.git
synced 2025-11-06 04:23:11 -05:00
* 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>
28 lines
698 B
TypeScript
28 lines
698 B
TypeScript
import { NestFactory } from '@nestjs/core';
|
|
import { AppModule } from './app.module';
|
|
import { Logger } from '@nestjs/common';
|
|
|
|
async function bootstrap() {
|
|
const app = await NestFactory.create(AppModule);
|
|
|
|
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',
|
|
'IMMICH MICROSERVICES',
|
|
);
|
|
}
|
|
|
|
if (process.env.NODE_ENV == 'production') {
|
|
Logger.log(
|
|
'Running Immich Machine Learning in PRODUCTION environment',
|
|
'IMMICH MICROSERVICES',
|
|
);
|
|
}
|
|
});
|
|
}
|
|
|
|
bootstrap();
|