{"size": 311, "ext": "js", "max_stars_repo_path": "src/startup/db.js", "max_stars_repo_name": "CompCult/cine-porto-api", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/startup/db.js", "max_issues_repo_name": "CompCult/cine-porto-api", "max_issues_repo_issues_event_min_datetime": "2019-04-03T02:19:55.000Z", "max_issues_repo_issues_event_max_datetime": "2019-04-06T00:04:54.000Z", "max_forks_repo_path": "src/startup/db.js", "max_forks_repo_name": "CompCult/cine-porto-api", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 8, "max_forks_count": null, "avg_line_length": 28.2727272727, "max_line_length": 66, "alphanum_fraction": 0.6237942122}
const mongoose = require('mongoose');
const config = require('config');

const db = config.get('db');

module.exports = () => {
  mongoose.connect(db, { useNewUrlParser: true })
    .then(() => console.log(`Connected on database ${db}...`))
    .catch(err => console.log(`Error connecting to ${db}` + err));
};
