node-go/packages/server/data/db.js

8 lines
203 B
JavaScript
Raw Normal View History

2020-01-08 05:46:24 +00:00
const knex = require('knex');
2020-01-14 22:42:46 +00:00
const knexConfig = require('../knexfile');
2020-01-08 05:46:24 +00:00
const env = process.env.NODE_ENV || 'development';
const configOptions = knexConfig[env];
2020-01-08 05:46:24 +00:00
module.exports = knex(configOptions);