title: How to connect to Heroku Postgresql from Sails.js Java Script
body: <p>js to create my application. I want to use Heroku database hosting where I created and got database. Now i try to connect to it from my application. That's snippet from my local.js :</p>
  
  <pre><code>adapters: {
  
  'default': 'postgres',
   module   : 'sails-postgresql',
   host     : '...',
   port     : 5432,
   user     : '...',
   password : '...',
   database : '...',
  
   schema: true //This makes sure that sails matches 
                 //the database schema to your models.
  }
  </code></pre>
  
  <p>When i lift the sails application i got error :</p>
  
  <p>"Error creating a connection to Postgresql: error: no pg_hba_conf entry for host "83.21...", user ..., database ..., SSL off"</p>
  
  <p>The "..." are user,databse etc from my local.js.</p>
  
  <p>How to fix the problem? When I change the data in the local.js to my local postgresql database it works fine, but when I change the data and try to connect to the database on Heroku hosting it displays the error all time :/</p>