Update dotenv configuration to specify environment file path

This commit is contained in:
2025-12-21 00:01:41 +01:00
parent f638c4709b
commit 0aa2ae1637

View File

@@ -1,4 +1,6 @@
import dotenv from 'dotenv';
import path from 'path';
import { fileURLToPath } from 'url';
import express from 'express';
import http from 'http';
import cors from 'cors';
@@ -11,7 +13,8 @@ import walletRoutes from './routes/wallet.js';
import pool from './db.js';
import { setupWebSocket } from './ws.js';
dotenv.config();
const __dirname = path.dirname(fileURLToPath(import.meta.url));
dotenv.config({ path: path.join(__dirname, '..', '.env') });
const app = express();