-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdb-headless.js
More file actions
27 lines (24 loc) · 847 Bytes
/
Copy pathdb-headless.js
File metadata and controls
27 lines (24 loc) · 847 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* -----------------------------------------------------------
*
* PayWhich Currency Bot - Database Command-line Helper
* Author: Jeremy Yen (jeremy5189@gmail.com)
* License: MIT
* Repo: https://github.com/jeremy5189/payWhich
* Production: http://paywhich.patricks.tw
*
* -----------------------------------------------------------
*/
var db = require('./db.js'),
config = require('./config.json');
if( process.argv.length < 7 ) {
console.log("Usage: node db-headless.js [int_org] [target_date] [base_currency] [NTD] [server_date]");
process.exit();
}
db.insert(config.mysql, [
process.argv[2], // 'visa',
process.argv[3], // target_date, // settle_date
process.argv[4], // base_currency,
process.argv[5], // NTD,
process.argv[6], // moment().format('YYYY-MM-DD HH:mm:ss')
'{}'
], false);