2022-03-25 15:26:55 -05:00
|
|
|
import { NestFactory } from '@nestjs/core';
|
|
|
|
|
import { AppModule } from './app.module';
|
2022-03-28 15:21:15 -05:00
|
|
|
import { Logger } from '@nestjs/common';
|
2022-03-25 15:26:55 -05:00
|
|
|
|
|
|
|
|
async function bootstrap() {
|
2022-03-27 14:58:54 -05:00
|
|
|
const app = await NestFactory.create(AppModule);
|
2022-03-25 15:26:55 -05:00
|
|
|
|
2023-01-24 06:18:35 +02:00
|
|
|
const port = Number(process.env.MACHINE_LEARNING_PORT) || 3003;
|
|
|
|
|
|
|
|
|
|
await app.listen(port, () => {
|
2022-03-28 15:21:15 -05:00
|
|
|
if (process.env.NODE_ENV == 'development') {
|
|
|
|
|
Logger.log(
|
2022-06-11 16:12:06 -05:00
|
|
|
'Running Immich Machine Learning in DEVELOPMENT environment',
|
2022-03-28 15:21:15 -05:00
|
|
|
'IMMICH MICROSERVICES',
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (process.env.NODE_ENV == 'production') {
|
|
|
|
|
Logger.log(
|
2022-06-11 16:12:06 -05:00
|
|
|
'Running Immich Machine Learning in PRODUCTION environment',
|
2022-03-28 15:21:15 -05:00
|
|
|
'IMMICH MICROSERVICES',
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
});
|
2022-03-25 15:26:55 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bootstrap();
|