mirror of
https://github.com/danbulant/sql2csv
synced 2026-05-19 04:18:33 +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 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 = "";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue