Update dotenv configuration to specify environment file path
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user