0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-16 20:26:19 -05:00

refactor(core): fix env set load order

This commit is contained in:
Gao Sun 2023-01-12 16:37:21 +08:00
parent f317a917c9
commit 80350b5e05
No known key found for this signature in database
GPG key ID: 13EBE123E4773688

View file

@ -3,15 +3,15 @@ import dotenv from 'dotenv';
import { findUp } from 'find-up';
import Koa from 'koa';
import { EnvSet } from './env-set/index.js';
import initI18n from './i18n/init.js';
import { tenantPool } from './tenants/index.js';
dotenv.config({ path: await findUp('.env', {}) });
// Import after env has configured
const { loadConnectorFactories } = await import('./utils/connectors/factories.js');
const { EnvSet } = await import('./env-set/index.js');
const { tenantPool } = await import('./tenants/index.js');
try {
const app = new Koa({