refactor(backend): Gebruik EnvVars ipv. process.env
This commit is contained in:
parent
9a17762fd4
commit
4fd03cd616
4 changed files with 24 additions and 18 deletions
|
@ -3,7 +3,6 @@ import { PostgreSqlDriver } from '@mikro-orm/postgresql';
|
|||
import { EnvVars, getEnvVar, getNumericEnvVar } from './util/envvars.js';
|
||||
import { SqliteDriver } from '@mikro-orm/sqlite';
|
||||
import { MikroOrmLogger } from './logging/mikroOrmLogger.js';
|
||||
import { LOG_LEVEL } from './config.js';
|
||||
|
||||
// Import alle entity-bestanden handmatig
|
||||
import { User } from './entities/users/user.entity.js';
|
||||
|
@ -69,7 +68,7 @@ function config(testingMode: boolean = false): Options {
|
|||
// EntitiesTs: entitiesTs,
|
||||
|
||||
// Logging
|
||||
debug: LOG_LEVEL === 'debug',
|
||||
debug: getEnvVar(EnvVars.LogLevel) === 'debug',
|
||||
loggerFactory: (options: LoggerOptions) => new MikroOrmLogger(options),
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue