Files
Avtex/test.cjs
T

21 lines
542 B
JavaScript

const { Pool } = require('pg');
async function test() {
const creds = [
['admin', 'admin'],
['postgres', 'postgres'],
['gitea', 'gitea_password'],
['gitea', 'gitea']
];
for (const [u, p] of creds) {
try {
const pool = new Pool({ connectionString: `postgresql://${u}:${p}@localhost:5432/postgres` });
await pool.query('SELECT 1');
console.log('✅ SUCCESS WITH:', u, p);
process.exit(0);
} catch(e) {
console.log('❌ failed:', u, p, e.message.substring(0, 40));
}
}
}
test();