const Sequelize = require('sequelize');

const sequelize = new Sequelize('aniruddh_smartsurveya', 'aniruddh_survey', 'nN+P[cJu9+fv', {
    host: 'localhost',
    dialect: 'mysql'
});

sequelize
    .authenticate()
    .then(() => {
        console.log('Connection has been established successfully.');
    })
    .catch(err => {
        console.error('Unable to connect to the database:', err);
    });

module.exports = sequelize;