Skip to content

Instantly share code, notes, and snippets.

@qcom
Created November 25, 2015 18:09
Embed
What would you like to do?
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