Initial commit
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
const { Pool } = require('pg');
|
||||
const pool = new Pool({ connectionString: 'postgres://postgres:csh%402018@localhost:5432/ai_pharmacy' });
|
||||
|
||||
pool.query("SELECT id, status, extracted_data FROM prescriptions ORDER BY created_at DESC LIMIT 2")
|
||||
.then(res => {
|
||||
console.log(res.rows);
|
||||
pool.end();
|
||||
})
|
||||
.catch(err => {
|
||||
console.error(err);
|
||||
pool.end();
|
||||
});
|
||||
Reference in New Issue
Block a user