From f22f73d1095030e4a63948339f28d10ca3feca56 Mon Sep 17 00:00:00 2001 From: alexmorenograu <61759297+alexmorenograu@users.noreply.github.com> Date: Fri, 12 Mar 2021 09:28:42 +0100 Subject: [PATCH] mysql create --- mysql.js | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 mysql.js diff --git a/mysql.js b/mysql.js new file mode 100644 index 0000000..2094904 --- /dev/null +++ b/mysql.js @@ -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!"); +}); \ No newline at end of file