text: import dotenv from 'dotenv';
  import { Pool } from 'pg';
  
  dotenv.config();
  
  const connectionString = process.env.DB_ELEPHANT;
  
  const pool = new Pool({ connectionString });
  
  
  export default {
  
    query(text, params) {
      return new Promise((resolve, reject) => {
        pool.query(text, params)
          .then((res) => {
            resolve(res);
          })
          .catch((err) => {
            reject(err);
          });
      });
    },
  };
  