Visual Studio / Azure Functions / NodeJs / Postgresql / LocalHost / MacBook
When I try to connect to my local Postgres database It works but each time I get this message in Visual Studio
My Code : index.js
module.exports = async function (context, req) { const pg = require('pg'); const config = { host: 'localhost', user: 'postgres', password: 'myPassword', database: 'myDataBase', port: 5432 }; const client = new pg.Client(config); client.connect(err => { if (err) { console.log('Error : ',err) } else { const query = 'select * from public.user'; client.query(query) .then(res => { const rows = res.rows; rows.map(row => { console.log(`Read: ${JSON.stringify(row)}`); }); process.exit(); }) .catch(err => { console.log(err); }); } }); } 
