const pool = require('./config'); async function testConnection() { try { const client = await pool.connect(); console.log('✅ Successfully connected to the database!'); const res = await client.query('SELECT VERSION()'); console.log('📊 Database Version:', res.rows[0].version); client.release(); } catch (err) { console.error('❌ Connection failed:', err); } finally { await pool.end(); } } testConnection();