Browse Source

doc : update

pull/13/head
oof1lab 7 years ago
parent
commit
03a537da8e
  1. 4
      README.md
  2. 15
      lib/util/cmd.helper.js

4
README.md

@ -74,7 +74,7 @@ Powered by popular node packages : ([express](https://github.com/expressjs/expre
* Group By, Having (as a separate API) :fire::fire: * Group By, Having (as a separate API) :fire::fire:
* Multiple group by in one API :fire::fire: * Multiple group by in one API :fire::fire:
* Chart API for numeric column :fire::fire: * Chart API for numeric column :fire::fire:
* Prototyping (features available with ONLY local MySql server) * Prototyping (features available when using local MySql server only)
* Run dynamic queries :fire::fire::fire: * Run dynamic queries :fire::fire::fire:
* Upload single file * Upload single file
* Upload multiple files * Upload multiple files
@ -552,7 +552,7 @@ _fields in Chart API can only take numeric column as its argument.
Dynamic queries on a database can be run by POST method to URL localhost:3000/dynamic Dynamic queries on a database can be run by POST method to URL localhost:3000/dynamic
This is enabled only when using local mysql server i.e -h localhost or -h 127.0.0.1 option. This is enabled **ONLY when using local mysql server** i.e -h localhost or -h 127.0.0.1 option.
Post body takes two fields : query and params. Post body takes two fields : query and params.

15
lib/util/cmd.helper.js

@ -12,12 +12,13 @@ program.on('--help', () => {
program program
.version('0.2.5') .version('0.2.5')
.option('-h, --host <n>', 'hostname') .option('-h, --host <n>', 'hostname / localhost by default')
.option('-d, --database <n>', 'database schema name')
.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('-n, --portNumber <n>', 'port number / 3000 by default') .option('-d, --database <n>', 'database schema name')
.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',list)
.parse(process.argv) .parse(process.argv)
@ -52,6 +53,14 @@ exports.handle = program => {
program.host = program.host || 'localhost'; program.host = program.host || 'localhost';
program.storageFolder = program.storageFolder || process.cwd() program.storageFolder = program.storageFolder || process.cwd()
if (program.ignoreTables) {
let ignoreTables = program.ignoreTables.split(',')
program.ignoreTables = {}
for (var i = 0; i < ignoreTables.length; ++i) {
program.ignoreTables[ignoreTables[i]] = ignoreTables[i];
}
}
program.connectionLimit = 10; program.connectionLimit = 10;
if (program.host === 'localhost' || program.host === '127.0.0.1' || program.host === '::1') { if (program.host === 'localhost' || program.host === '127.0.0.1' || program.host === '::1') {

Loading…
Cancel
Save