mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
refactor(server): immich app env (#13169)
This commit is contained in:
parent
3ac00b0ffa
commit
9edc9d6151
4 changed files with 14 additions and 8 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue