mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-05 11:06:28 +00:00
15 lines
362 B
JavaScript
15 lines
362 B
JavaScript
const knex = require("knex");
|
|
require("dotenv").config();
|
|
|
|
const knexfile = require("../../knexfile");
|
|
|
|
const env = process.env.NODE_ENV || "production";
|
|
|
|
// if running unit testing, please change the configOptions to knexfile["testing"]
|
|
|
|
const configOptions = knexfile[env];
|
|
// const configOptions = knexfile["testing"];
|
|
|
|
|
|
module.exports = knex(configOptions);
|