kotare-2016 / learning

0 stars 0 forks source link

database setup #13

Closed joshuavial closed 8 years ago

joshuavial commented 8 years ago
joshuavial commented 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)