Closed joshuavial closed 8 years ago
Look at the process.env.NODE_ENV variable (development, test, production) use that to determine which config to read from knexfile.js
knex_config = require('knexfile')
db_config = knex_cofnig[proces.env.NODE_ENV]
knex = require('knex')(db_config)