test db connection from heroku cli code example
Example 1: how to find my postgres hostname heorku
heroku pg:credentials:url
Example 2: link db to heroku
DATABASE_URL=postgresql://name:pass@localhost:5432/db name
heroku pg:credentials:url
DATABASE_URL=postgresql://name:pass@localhost:5432/db name