I’m trying to hook up a database to an Express app. It works fine locally, but when I try to load "/."
I am shown this message:
upstream connect error or disconnect/reset before headers. reset reason: connection failure, transport failure reason: delayed connect error: 111
Checking the logs reveals the following error:
error: connection is insecure (try using `sslmode=require`)
I’ve tried using variations of sslmode=require
(such as ssl=true
), but they open a whole new can of worms that don’t seem to bring me any closer to deployment.
The app worked fine before I added the database. The database is the free Koyeb Postgres service, version 14 to match my local testing database.