fix: Correct dirname for the app config
This commit is contained in:
@@ -2,6 +2,9 @@ import { URL } from 'node:url';
|
||||
import * as dotenv from 'dotenv';
|
||||
import path from 'path';
|
||||
import process from 'node:process';
|
||||
import { fileURLToPath } from 'url';
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
||||
|
||||
if (process.env.APP_ENV === 'test') {
|
||||
dotenv.config({ path: path.resolve(__dirname, '../../.env.test') });
|
||||
|
Reference in New Issue
Block a user