title: node-postgres returning undefined result
body: <p>When i try to get result from node-postgres from my express app, pool.query is returning undefined result when i log it in console. Not sure if its about database connected properly or I am not returning the result properly? I am using heroku to deploy the app and using connection string given by heroku. Cant figure it out, anyone there to help please?.</p>
  <p>db.js:</p>
  <pre><code>const { Pool } = require('pg');
  const conString = process.env.DATABASE_URL;
  const pool = new Pool({
      connectionString: conString,
          ssl: {rejectUnauthorized: false}
  });
  module.exports ={
      getResult: (sql, params, callback)=&gt;{
          pool.query(sql, [params], (error, results)=&gt;{
              console.log(results);
              if(!error){
                  callback(results);
              }else{
                  callback(null);
              }
              pool.end();
          });
      }
  }
  </code></pre>
  <p>user-model.js</p>
  <pre><code>var db = require('./db');
  
  module.exports ={
      findUserById: (userId)=&gt;{
          return new Promise((resolve, reject)=&gt;{
              var sql = &quot;select id from users where id=?&quot;;
              db.getResult(sql, [userId], (result)=&gt;{
                  if(result.length&gt;0){
                      resolve(true);
                  }else{
                      resolve(false);
                  }
              });
          });
      }
  }
  </code></pre>