mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
refactor(core): Move backend config to a separate package (no-changelog) (#9325)
This commit is contained in:
committed by
GitHub
parent
1d5b9836ca
commit
c7d4b471c4
@@ -1,10 +1,11 @@
|
||||
import 'tsconfig-paths/register';
|
||||
import { Container } from 'typedi';
|
||||
import { GlobalConfig } from '@n8n/config';
|
||||
import { DataSource as Connection } from '@n8n/typeorm';
|
||||
import config from '@/config';
|
||||
import { getBootstrapDBOptions, testDbPrefix } from './integration/shared/testDb';
|
||||
|
||||
export default async () => {
|
||||
const dbType = config.getEnv('database.type');
|
||||
const { type: dbType } = Container.get(GlobalConfig).database;
|
||||
if (dbType !== 'postgresdb' && dbType !== 'mysqldb') return;
|
||||
|
||||
const connection = new Connection(getBootstrapDBOptions(dbType));
|
||||
|
||||
Reference in New Issue
Block a user