I am trying to initialize a connection to my PG database doing this:
pgp = require('pg-promise')({
// Initialization Options
}),
cn = {
host: 'activity.postgres.activity', // server name or IP address;
port: 5432,
database: 'activity',
user: 'postgres',
password: ''
},
db = pgp(cn),
But I keep getting:
Error: connect ECONNREFUSED 172.20.0.3:5432
Any idea why?
RESOLVED: set the listen_addresses = '*' in the postgresql.conf file