express-typescript-boilerplate icon indicating copy to clipboard operation
express-typescript-boilerplate copied to clipboard

Error connecting to PostgreSQL with SSL

Open kidsil opened this issue 4 years ago • 0 comments

When trying to connect to a PostgreSQL the following error occurs (on yarn run setup): error: no pg_hba.conf entry for host "HOSTNAME", user "USERNAME", database "PASSWORD", SSL off

This is due to TypeORM not having the ssl: on option (and I couldn't find an existing .env var corresponding to it).

For now, to avoid changing the code for initial setup I've been running PGSSLMODE=require to fix this issue (full command PGSSLMODE=require yarn run setup)

kidsil avatar Feb 15 '21 16:02 kidsil