|
|
@ -12,10 +12,11 @@ program.on('--help', () => { |
|
|
|
|
|
|
|
|
|
|
|
program |
|
|
|
program |
|
|
|
.version('0.4.1') |
|
|
|
.version('0.4.1') |
|
|
|
.option('-h, --host <n>', 'hostname / localhost by default') |
|
|
|
.option('-h, --host <n>', 'hostname of database / localhost by default') |
|
|
|
.option('-u, --user <n>', 'username of database / root by default') |
|
|
|
.option('-u, --user <n>', 'username of database / root by default') |
|
|
|
.option('-p, --password <n>', 'password of database / empty by default') |
|
|
|
.option('-p, --password <n>', 'password of database / empty by default') |
|
|
|
.option('-d, --database <n>', 'database schema name') |
|
|
|
.option('-d, --database <n>', 'database schema name') |
|
|
|
|
|
|
|
.option('-r, --ipAddress <n>', 'IP interface of your server / locahost by default') |
|
|
|
.option('-n, --portNumber <n>', 'port number for app / 3000 by default') |
|
|
|
.option('-n, --portNumber <n>', 'port number for app / 3000 by default') |
|
|
|
.option('-s, --storageFolder <n>', 'storage folder / current working dir by default / available only with local') |
|
|
|
.option('-s, --storageFolder <n>', 'storage folder / current working dir by default / available only with local') |
|
|
|
.option('-i, --ignoreTables <n>', 'comma separated table names to ignore') |
|
|
|
.option('-i, --ignoreTables <n>', 'comma separated table names to ignore') |
|
|
@ -48,6 +49,7 @@ function processInvalidArguments(program) { |
|
|
|
exports.handle = program => { |
|
|
|
exports.handle = program => { |
|
|
|
|
|
|
|
|
|
|
|
/**************** START : default values ****************/ |
|
|
|
/**************** START : default values ****************/ |
|
|
|
|
|
|
|
program.ipAddress = program.ipAddress || 'localhost'; |
|
|
|
program.portNumber = program.portNumber || 3000; |
|
|
|
program.portNumber = program.portNumber || 3000; |
|
|
|
program.user = program.user || 'root'; |
|
|
|
program.user = program.user || 'root'; |
|
|
|
program.password = program.password || ''; |
|
|
|
program.password = program.password || ''; |
|
|
|