Currently, I am facing an issue with connecting to my postgreSQL database on Heroku from my express app. The connection functions properly when the express app is deployed on Heroku, but I encounter difficulties connecting to the database while running the express app locally.
const db = require('knex')({
client: 'pg',
connection: ${process.env.DATABASE_URL}?ssl=true,
});
After attempting the connection, I am presented with this error message:
err: Error: self signed certificate
.
Would appreciate any guidance on how to resolve this connectivity issue. Thanks!