require('dotenv').config({ path: require('path').resolve(__dirname, '../.env') }); const { Client } = require('pg'); const client = new Client({ host: '87.106.21.21', port: 5432, database: 'enwelo', user: 'postgres', password: process.env.DB_PASSWORD }); async function run() { try { await client.connect(); const res = await client.query(` SELECT column_name, data_type FROM information_schema.columns WHERE table_schema = 'geodaten' AND table_name = 'wea'; `); console.log(res.rows); } catch (err) { console.error(err); } finally { await client.end(); } } run();