refactor(server): port env (#13158)

This commit is contained in:
Jason Rasmussen 2024-10-03 13:29:40 -04:00 committed by GitHub
parent bf43c32dbf
commit 892a35acb5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 4 additions and 2 deletions

View file

@ -32,12 +32,11 @@ async function bootstrap() {
otelStart(otelPort);
const port = Number(process.env.IMMICH_PORT) || 3001;
const app = await NestFactory.create<NestExpressApplication>(ApiModule, { bufferLogs: true });
const logger = await app.resolve<ILoggerRepository>(ILoggerRepository);
const configRepository = app.get<IConfigRepository>(IConfigRepository);
const { environment } = configRepository.getEnv();
const { environment, port } = configRepository.getEnv();
const isDev = environment === ImmichEnvironment.DEVELOPMENT;
logger.setAppName('Api');