Hi when i deploy my app in free tier in heroku there is no error, but when i changed to my db to a paid db like $50, i cant deploy my app and getting this error.
sql_error_code = 28000 FATAL: no pg_hba.conf entry for host “######”, user “#####”, database “#######”, SSL off
how can i solve this problem, any one can help me?
After searching this problem in hours, i found a solution.
For Heroku we need unverifiedTLS transport. for paid postgres.
https://api.vapor.codes/postgresql/latest/PostgreSQL/Classes/PostgreSQLConnection/TransportConfig.html
I changed my
databaseConfig = PostgreSQLDatabaseConfig(url: url)!
code in configure.swift file to
databaseConfig = PostgreSQLDatabaseConfig(url: url, transport: PostgreSQLConnection.TransportConfig.unverifiedTLS)!
and deployed again and it solves the problem.
@erdmzgr Thank you for sharing your solution - much appreciated!