mirror of
https://github.com/immich-app/immich.git
synced 2025-11-13 04:02:35 +09:00
refactor(server): port env (#13158)
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user