const mysql = require('mysql'); const config = require('./config'); var con = mysql.createConnection({ host: "test-db.verdnatura.es", database: "vn", user: config.userDev, password: config.passwordDev, port: 3307, }); con.connect(function(err) { if (err) { console.error('Error connecting: ' + err.stack); return; } console.log("Connected!"); });