var Sequelize = require('sequelize');

var db = new Sequelize('postgres', 'postgres', ' ', {
  dialect: 'postgres',
  port: 5432
});

db.authenticate()
  .then((err) => {
    console.log('Database connection established');
  }, (err) => {
    console.log('Unable to connect to the database: ', err);
  });

  module.exports = {database: db, Sequelize:Sequelize};
const Sequelize = require('sequelize');

const db = new Sequelize('postgres', 'postgres', ' ', {
  dialect: 'postgres',
  port: 5432,
});

db.authenticate()
  .then((err) => {
    if (err) {
      console.log('Unable to connect to the database');
    } else {
      console.log('Database connection established');
    }
  });

module.exports = { database: db, Sequelize: Sequelize };

Fix airbnb styleguide issues in database.js