const knex = require('knex');

const initializeDb = () => {
  const dbConfig = {
      client: 'pg',
      connection: {
          host: '192.168.0.10',
          user: 'userName',
          password: 'password',
          database: process.env.DB_NAME || 'dbName'
      },
      migrations: {
          directory: './migrations'
      }
  }; 

  return knex(dbConfig);
};

const db = initializeDb();

module.exports = db;
