Skip to content

Instantly share code, notes, and snippets.

@qcom
Created November 25, 2015 18:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save qcom/d00091d89703df6e0219 to your computer and use it in GitHub Desktop.
Save qcom/d00091d89703df6e0219 to your computer and use it in GitHub Desktop.
bookshelf initialization
var config = require('config');
var knex = require('knex')({
client: 'pg',
connection: config.get('postgresConnstring'),
debug: process.env.NODE_ENV === 'development'
});
var bookshelf = require('bookshelf')(knex);
bookshelf.plugin('virtuals');
module.exports = bookshelf;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment