1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-10 13:56:47 +01:00
immich/server/apps/microservices/src/main.ts
2022-06-29 21:49:35 -05:00

21 lines
744 B
TypeScript

import { Logger } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import { RedisIoAdapter } from '../../immich/src/middlewares/redis-io.adapter.middleware';
import { MicroservicesModule } from './microservices.module';
async function bootstrap() {
const app = await NestFactory.create(MicroservicesModule);
app.useWebSocketAdapter(new RedisIoAdapter(app));
await app.listen(3002, () => {
if (process.env.NODE_ENV == 'development') {
Logger.log('Running Immich Microservices in DEVELOPMENT environment', 'ImmichMicroservice');
}
if (process.env.NODE_ENV == 'production') {
Logger.log('Running Immich Microservices in PRODUCTION environment', 'ImmichMicroservice');
}
});
}
bootstrap();