12 lines
277 B
JavaScript
12 lines
277 B
JavaScript
|
import knex from "knex";
|
||
|
import { development, production } from "./knexfile.cjs";
|
||
|
|
||
|
const env = process.env.ENVIRONMENT || "development";
|
||
|
|
||
|
console.log(env);
|
||
|
console.log(development);
|
||
|
|
||
|
const db = env === "development" ? knex(development) : knex(production);
|
||
|
|
||
|
export default db;
|