const mysql = require('mysql');

var connection = mysql.createConnection({
  host     : process.env.RELISTEN_DB_HOST || '127.0.0.1',
  user     : process.env.RELISTEN_DB_USER || 'root',
  database : process.env.RELISTEN_DB_NAME || 'relisten',
  password : process.env.RELISTEN_DB_PASS || ''
});

connection.connect(function(err) {
  if (err) {
    console.error('error connecting: ' + err.stack);
    return;
  }
});

module.exports = connection;


const mysql = require('mysql');

var connection = mysql.createConnection(process.env.MYSQL_URL_INT || 'mysql://root@127.0.0.1/relisten');

connection.connect(function(err) {
  if (err) {
    console.error('error connecting: ' + err.stack);
    return;
  }
});

module.exports = connection;


Use flat mysql connection string
Use flat mysql connection string
