import { Pool } from 'pg'; const pool = new Pool({ connectionString: 'postgresql://sail:password@localhost:5432/dutchie_menus' }); async function checkProxies() { try { const result = await pool.query(` SELECT COUNT(*) as total, COUNT(*) FILTER (WHERE active = true) as active, COUNT(*) FILTER (WHERE state = 'Arizona') as arizona FROM proxies `); console.log('Proxy Stats:'); console.log('─'.repeat(40)); console.log(`Total: ${result.rows[0].total}`); console.log(`Active: ${result.rows[0].active}`); console.log(`Arizona: ${result.rows[0].arizona}`); console.log('─'.repeat(40)); } catch (error: any) { console.error('Error:', error.message); } finally { await pool.end(); } } checkProxies();