From 9d3c6e8fd869564f78553bfccbf751d089dd75c8 Mon Sep 17 00:00:00 2001 From: danbulant Date: Sat, 28 Sep 2019 13:47:21 +0200 Subject: [PATCH] default configuration --- index.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/index.js b/index.js index f42010f..df8a22b 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,6 @@ const fs = require("fs"); +const sql2csv = require("./sql2csv"); + const configLoc = "config.yml"; var config = {}; @@ -53,19 +55,19 @@ if(config.crlf == undefined){ config.crlf = false; } if(config.host == undefined){ - warn("Undefined crlf, using false"); - config.host = false; + warn("Undefined host, using localhost"); + config.host = "localhost"; } if(config.port == undefined){ - warn("Undefined crlf, using false"); - config.port = false; + warn("Undefined port, using 3306"); + config.port = 3306; } if(config.username == undefined){ - warn("Undefined crlf, using false"); - config.username = false; + warn("Undefined username, using root"); + config.username = "root"; } if(config.password == undefined){ - warn("Undefined crlf, using false"); - config.password = false; + warn("Undefined password, using nothing"); + config.password = ""; }