live updates and file organization
This commit is contained in:
12
backend/scripts/listServers.js
Normal file
12
backend/scripts/listServers.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const { Pool } = require('pg');
|
||||
(async function(){
|
||||
try{
|
||||
const pool = new Pool({ connectionString: process.env.DATABASE_URL });
|
||||
const res = await pool.query('SELECT guild_id FROM servers LIMIT 10');
|
||||
console.log('servers:', JSON.stringify(res.rows, null, 2));
|
||||
await pool.end();
|
||||
}catch(err){
|
||||
console.error('ERR', err && err.message ? err.message : err);
|
||||
process.exit(1);
|
||||
}
|
||||
})();
|
||||
Reference in New Issue
Block a user