Skip to content

Instantly share code, notes, and snippets.

@kimschles
Created April 18, 2018 20:58
Show Gist options
  • Select an option

  • Save kimschles/808b8ba65aefb7b520f45525b82e9025 to your computer and use it in GitHub Desktop.

Select an option

Save kimschles/808b8ba65aefb7b520f45525b82e9025 to your computer and use it in GitHub Desktop.
const environment = process.env.NODE_ENV || 'development';
const config = require('./knexfile');
const environmentConfig = config[environment];
const knex = require('knex');
const connection = knex(environmentConfig);
module.exports = connection;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment