Connecting with SSL
I'm using a db with
sslmode=require
which I thought needed encryption, but doesn't actually check the certificate. I keep running into an error:
Error: self-signed certificate in certificate chain
Here's the code I use to create my connection singleton.
Am I missing something here? FWIW, the error doesn't throw in this file because I don't actually call await client.connect()
because can't have top level awaits. Ideally I can keep this as a singleton instead of exporting a function to connect to it. Thxx!
The picture below shows the docs from node-postgres. It says not to use both the sslmode and the ssl config, but the error persists no in both of these![No description](https://cdn.answeroverflow.com/1263180853887107182/Screenshot_2024-07-17_at_10.07.26_AM.png)
1 Reply
Anyone able to help? 🙏