Created
November 25, 2015 18:09
-
-
Save qcom/d00091d89703df6e0219 to your computer and use it in GitHub Desktop.
bookshelf initialization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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