File manager - Edit - /home/webapp69.cm.in.th/u69319090038/Shop/config/db.js
Back
const mysql = require('mysql2/promise'); require('dotenv').config(); const pool = mysql.createPool({ host: process.env.DB_HOST || 'localhost', user: process.env.DB_USER || 'root', password: process.env.DB_PASSWORD || '', database: process.env.DB_NAME || 'shopee_auth', port: parseInt(process.env.DB_PORT || '3306'), waitForConnections: true, connectionLimit: 10, queueLimit: 0, timezone: '+07:00', }); // Test connection on startup (async () => { try { const conn = await pool.getConnection(); console.log('✅ MySQL connection pool established.'); conn.release(); } catch (err) { console.error('❌ MySQL connection failed:', err.message); process.exit(1); } })(); module.exports = pool;
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.23 |
proxy
|
phpinfo
|
Settings