mirror of
https://github.com/immich-app/immich.git
synced 2025-11-14 10:52:39 +09:00
refactor(server): immich app env (#13169)
This commit is contained in:
@@ -5,7 +5,7 @@ import cookieParser from 'cookie-parser';
|
||||
import { existsSync } from 'node:fs';
|
||||
import sirv from 'sirv';
|
||||
import { ApiModule } from 'src/app.module';
|
||||
import { envName, excludePaths, resourcePaths, serverVersion } from 'src/constants';
|
||||
import { excludePaths, resourcePaths, serverVersion } from 'src/constants';
|
||||
import { ImmichEnvironment } from 'src/enum';
|
||||
import { IConfigRepository } from 'src/interfaces/config.interface';
|
||||
import { ILoggerRepository } from 'src/interfaces/logger.interface';
|
||||
@@ -39,7 +39,6 @@ async function bootstrap() {
|
||||
const { environment, port } = configRepository.getEnv();
|
||||
const isDev = environment === ImmichEnvironment.DEVELOPMENT;
|
||||
|
||||
logger.setAppName('Api');
|
||||
logger.setContext('Bootstrap');
|
||||
app.useLogger(logger);
|
||||
app.set('trust proxy', ['loopback', 'linklocal', 'uniquelocal', ...trustedProxies]);
|
||||
@@ -75,7 +74,7 @@ async function bootstrap() {
|
||||
const server = await (host ? app.listen(port, host) : app.listen(port));
|
||||
server.requestTimeout = 30 * 60 * 1000;
|
||||
|
||||
logger.log(`Immich Server is listening on ${await app.getUrl()} [v${serverVersion}] [${envName}] `);
|
||||
logger.log(`Immich Server is listening on ${await app.getUrl()} [v${serverVersion}] [${environment}] `);
|
||||
}
|
||||
|
||||
bootstrap().catch((error) => {
|
||||
|
||||
Reference in New Issue
Block a user