mirror of
https://github.com/danbulant/sql2csv
synced 2026-06-19 22:41:46 +00:00
default configuration
This commit is contained in:
parent
fcb4ccc8d9
commit
9d3c6e8fd8
1 changed files with 10 additions and 8 deletions
18
index.js
18
index.js
|
|
@ -1,4 +1,6 @@
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
|
const sql2csv = require("./sql2csv");
|
||||||
|
|
||||||
const configLoc = "config.yml";
|
const configLoc = "config.yml";
|
||||||
var config = {};
|
var config = {};
|
||||||
|
|
||||||
|
|
@ -53,19 +55,19 @@ if(config.crlf == undefined){
|
||||||
config.crlf = false;
|
config.crlf = false;
|
||||||
}
|
}
|
||||||
if(config.host == undefined){
|
if(config.host == undefined){
|
||||||
warn("Undefined crlf, using false");
|
warn("Undefined host, using localhost");
|
||||||
config.host = false;
|
config.host = "localhost";
|
||||||
}
|
}
|
||||||
if(config.port == undefined){
|
if(config.port == undefined){
|
||||||
warn("Undefined crlf, using false");
|
warn("Undefined port, using 3306");
|
||||||
config.port = false;
|
config.port = 3306;
|
||||||
}
|
}
|
||||||
if(config.username == undefined){
|
if(config.username == undefined){
|
||||||
warn("Undefined crlf, using false");
|
warn("Undefined username, using root");
|
||||||
config.username = false;
|
config.username = "root";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(config.password == undefined){
|
if(config.password == undefined){
|
||||||
warn("Undefined crlf, using false");
|
warn("Undefined password, using nothing");
|
||||||
config.password = false;
|
config.password = "";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue