I'm trying to deploy my API to Heroku but when it's starting it shows the following error
2021-10-28T02:57:12.498187+00:00 app[web.1]: [Nest] 22 - 10/28/2021, 2:57:12 AM ERROR [TypeOrmModule] Unable to connect to the database. Retrying (1)...
2021-10-28T02:57:12.498241+00:00 app[web.1]: Error: self signed certificate
My appmodule.module.ts can be found here https://github.com/santfirax/backend-product-store/blob/main/src/app.module.ts
open terminal do this
heroku config -a your_app_name
database_url=postgres://:@:5432/<DB_NAME>
heroku config:set DB_CONNECTION=pgsql
heroku config:set DB_USERNAME=<USERNAME>
heroku config:set DB_PASSWORD=<PASSWORD>
heroku config:set DB_HOST=<HOST>
heroku config:set DB_DATABASE=<DB_NAME>
https://qiita.com/hiro5963/items/4e94ff02ad0faa63e4ef
check this url and google translate