{"size": 567, "ext": "js", "max_stars_repo_path": "lib/database/db.js", "max_stars_repo_name": "deveroni/server", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "lib/database/db.js", "max_issues_repo_name": "deveroni/server", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "lib/database/db.js", "max_forks_repo_name": "deveroni/server", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.68, "max_line_length": 45, "alphanum_fraction": 0.6701940035}
'use strict';

var creds = require('./secret').dbUser;

// Set info for database
var knex = require('knex')({
    client: 'pg',
    connection: {
      host : '127.0.0.1',
      user : creds.dbUser,
      password : creds.dbPassword,
      database : 'meloan'
    }
});
const bookshelf = require('bookshelf')(knex);

// Load bookshelf plugins
bookshelf.plugin('bookshelf-json-coloms');
bookshelf.plugin('bookshelf-update');
bookshelf.plugin('bookshelf-spotparse');
bookshelf.plugin('registry');

// Export
module.exports.knex = knex;
module.exports.shelf = bookshelf;