title: heroku Postgres - sequelize : no pg_hba.conf entry for host
body: <p>I am trying to run migrations on my Nodejs application hosted on Heroku using the Heroku free Postgres database.</p>
  
  <p>I am using Sequelize as my ORM.This is my configuration for the production connection.</p>
  
  <pre><code>const dotenv = require('dotenv');
  
  dotenv.config();
  
  module.exports = {
    production: {
      use_env_variable: 'DATABASE_URL',
      dialect: process.env.DIALECT,
      protocol: process.env.DIALECT,
    }
  }
  </code></pre>
  
  <p>When I use the above configuration, I get the following error: <code>no pg_hba.conf entry for host "000.000.000.0", user "yyyyyyyyyyyyyy", database "xxxxxxxxxxxxx", SSL off</code></p>
  
  <p>However when I add the options below to the config, I get a self-signed certificate error.</p>
  
  <pre><code>dialectOptions: {
  ssl: true
  }
  </code></pre>
  
  <p>Please, how do I resolve this?</p>