const mysql = require('mysql');
const config = require('./config')
var conn = mysql.createConnection({
    'host':config.database.host,
    'user':config.database.user,
    'password':config.database.password,
    'database':config.database.db
})

conn.connect((err)=>{
    if(err){
        console.log('error! DB not connected.')
    }else{
        console.log('DB connected.')
    }
})

module.exports= conn;