mysql test

This commit is contained in:
alexmorenograu 2021-03-12 09:07:07 +01:00
parent 7bde341f21
commit 2514f9b098
1 changed files with 10 additions and 4 deletions

View File

@ -1,12 +1,18 @@
var mysql = require('mysql');
const mysql = require('mysql');
const config = require('./config');
var con = mysql.createConnection({
host: "test-db.verdnatura.es",
user: "vicent",
password: "llopis.19263"
database: "vn",
user: "alex",
password: config.bdpassword
});
con.connect(function(err) {
if (err) throw err;
if (err) {
console.error('Error connecting: ' + err.stack);
return;
}
console.log("Connected!");
});