24 lines
557 B
JavaScript
24 lines
557 B
JavaScript
const { Client } = require('pg');
|
|
|
|
async function check() {
|
|
const client = new Client({
|
|
host: '87.106.21.21',
|
|
port: 5432,
|
|
user: 'enwelo_admin',
|
|
password: 'WX1t1cgP1qK09',
|
|
database: 'enwelo'
|
|
});
|
|
|
|
try {
|
|
await client.connect();
|
|
const res = await client.query("SELECT * FROM geodaten.wea_standorte");
|
|
console.log(`Found ${res.rowCount} rows.`);
|
|
console.log(res.rows);
|
|
} catch (e) {
|
|
console.error(e);
|
|
} finally {
|
|
await client.end();
|
|
}
|
|
}
|
|
check();
|