I am using nodejs firebase functions. I use sequlize to connect to the postgres db.
I tried following the doc https://cloud.google.com/functions/docs/sql to connect to the db from firebase functions, but I am not able to connect. I get this error.
Failed to prune sessions: connect ECONNREFUSED 127.0.0.1:5432
This is the configuration that I use.
{ username: 'postgres',
password: '*********',
database: 'testdb',
host: '/cloudsql/my-project:us-central1:db-instance',
port: 5432,
dialect: 'postgres',
dialectOptions: { ssl: false }}
Any thoughts ?