1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-10 05:46:46 +01:00
immich/server/apps/microservices/src/main.ts
Alex 6db541c89b
chore(server) Update NestJs to V9 (#1312)
* chore(server) update nestjs to v9

* remove deadcode

* downgrade local-reverse-geocoder

* Added ignore script

* remove ignore script

* Fixed local-reverse-geocoder to a working version

* Fixed issue with eslint mismatch typescript version

* chore: remove unused package

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
2023-01-12 16:07:27 -06:00

21 lines
830 B
TypeScript

import { Logger } from '@nestjs/common';
import { NestFactory } from '@nestjs/core';
import { SERVER_VERSION } from 'apps/immich/src/constants/server_version.constant';
import { RedisIoAdapter } from '../../immich/src/middlewares/redis-io.adapter.middleware';
import { MicroservicesModule } from './microservices.module';
const logger = new Logger('ImmichMicroservice');
async function bootstrap() {
const app = await NestFactory.create(MicroservicesModule);
const redisIoAdapter = new RedisIoAdapter(app);
await redisIoAdapter.connectToRedis();
app.useWebSocketAdapter(redisIoAdapter);
await app.listen(3002, () => {
const envName = (process.env.NODE_ENV || 'development').toUpperCase();
logger.log(`Running Immich Microservices in ${envName} environment - version ${SERVER_VERSION}`);
});
}
bootstrap();