diff --git a/index.js b/index.js index 8caf61a..062ba8a 100644 --- a/index.js +++ b/index.js @@ -14,6 +14,7 @@ program .option('-t, --type [value]', 'http|https,http for default') .option('-p, --port [value]', 'proxy port, 8001 for default') .option('-c, --clear', 'clear all the tmp certificates') + .option('-h, --help', 'print help info') .parse(process.argv); var PROXY_PORT = program.port || 8001, @@ -27,6 +28,10 @@ if(program.clear){ console.log("certificates cleared"); process.exit(0); }); + +}else if(program.help){ + program.help(); + }else{ var serverMgrInstance = new serverMgr(), httpProxyServer; diff --git a/lib/createCert.js b/lib/createCert.js index d427741..5b7fa66 100644 --- a/lib/createCert.js +++ b/lib/createCert.js @@ -1,3 +1,4 @@ +//TODO : move to the tmp/ dir var exec = require('child_process').exec; module.exports = function(hostname,callback){