Deploy: 2026-05-21 17:59:48

This commit is contained in:
Hamza-Ayed
2026-05-21 17:59:48 +03:00
parent 716b6f93bf
commit 71cef1de1d
2 changed files with 21 additions and 0 deletions

View File

@@ -10,6 +10,7 @@
"@whiskeysockets/baileys": "^6.7.9",
"axios": "^1.7.2",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"express": "^4.19.2",
"pino": "^9.2.0"
}

View File

@@ -1,3 +1,23 @@
const fs = require('fs');
const path = require('path');
const dotenv = require('dotenv');
// Find .env file identically to how PHP bootstrap does it
const envPaths = [
path.join(__dirname, '.env'),
path.join(__dirname, '../.env'),
path.join(__dirname, '../backend/.env'),
path.join(__dirname, '../../../.env')
];
for (const p of envPaths) {
if (fs.existsSync(p)) {
dotenv.config({ path: p });
console.log(`Loaded environment from ${p}`);
break;
}
}
const express = require('express');
const cors = require('cors');
const { startSession, disconnectSession } = require('./baileys-client');