// src/db/knex.js
const knex = require('knex');
const path = require('path');

const knexfile = require(path.join(__dirname, '../../knexfile.js'));
const env = process.env.NODE_ENV || 'development';

const db = knex(knexfile[env] || knexfile);

module.exports = db;
