UNPKG

dish2

Version:

Dish2 is a command line tool for DHIS 2 Web API interaction

15 lines (11 loc) 343 B
#!/usr/bin/env node const conf = require('./configManager.js'); const app = {}; app.run = function() { if (!conf.isArg('file')) { return console.log('Usage: post_js --file <js-file>'); } var url = conf.getConf().dhis.baseurl + '/api/files/script'; conf.postFile(url, conf.getArgs().file, 'application/javascript'); } app.run();