// const knex = require('knex')
// const {attachPaginate} = require('knex-paginate')

// attachPaginate()
// module.exports = knex({
//     client: 'mysql',
//     port: 3306,
//     connection: {
//         host: process.env.DBHOST,
//         database: process.env.DBNAME,
//         user: process.env.DBUSER,
//         password: process.env.DBPASS,
//     }
// });

const knex =require('knex')
const {attachPaginate} = require('knex-paginate')
const config =require('../knexfile')

attachPaginate()
module.exports = () => {
  return knex(config.development); // Use the appropriate environment configuration ('development', 'production', etc.)
};