28 lines
444 B
JavaScript
28 lines
444 B
JavaScript
import { createRequire } from 'module';
|
|
import path from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
const require = createRequire(import.meta.url);
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = path.dirname(__filename);
|
|
|
|
const fs = require('fs');
|
|
const mypath = path.join(__dirname, '../../../../../../../../system/db/.env');
|
|
require('dotenv').config({ path: mypath })
|
|
|
|
console.log(process.env.MY_USER);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|