mysql create

This commit is contained in:
alexmorenograu 2021-03-12 09:28:42 +01:00
parent 15cb2bcb38
commit f22f73d109
1 changed files with 18 additions and 0 deletions

18
mysql.js Normal file
View File

@ -0,0 +1,18 @@
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
});
con.connect(function(err) {
if (err) {
console.error('Error connecting: ' + err.stack);
return;
}
console.log("Connected!");
});