Files
AI_Pharmacy_Api/test-db3.js
T
2026-07-29 11:38:27 +05:30

13 lines
331 B
JavaScript

const { Pool } = require('pg');
const pool = new Pool({ connectionString: 'postgres://postgres:csh%402018@localhost:5432/ai_pharmacy' });
pool.query("SELECT id, brand_name FROM products")
.then(res => {
console.log('products:', res.rows);
pool.end();
})
.catch(err => {
console.error(err);
pool.end();
});