Fix: Restore website functionality - all pages and APIs working
This commit is contained in:
19
backend/test_db_quick.js
Normal file
19
backend/test_db_quick.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const {query} = require('./config/database');
|
||||
|
||||
console.log('Testing query wrapper...');
|
||||
const timeout = setTimeout(() => {
|
||||
console.log('TIMEOUT - query() is hanging!');
|
||||
process.exit(1);
|
||||
}, 3000);
|
||||
|
||||
query('SELECT NOW() as time')
|
||||
.then(r => {
|
||||
clearTimeout(timeout);
|
||||
console.log('SUCCESS:', r.rows[0]);
|
||||
process.exit(0);
|
||||
})
|
||||
.catch(e => {
|
||||
clearTimeout(timeout);
|
||||
console.log('ERROR:', e.message);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user