const mysql = require('mysql')

module.exports = (dbSetting) => {
  let connection = mysql.createConnection({
    host: dbSetting.hostname,
    user: dbSetting.username,
    password: dbSetting.password,
    database: dbSetting.database
  })

  connection.connect()
}

const mysql = require('mysql')

module.exports = (dbSetting) => {
  let connection = mysql.createConnection({
    host: dbSetting.hostname,
    user: dbSetting.username,
    password: dbSetting.password,
    database: dbSetting.database
  })

  return connection
}

Make the settings of database and connect to database
Make the settings of database and connect to database
