From c6eb2fa892d71a8a9e6eb6a30e531a251ab4ac4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8A=A0=E9=87=8C?= Date: Sat, 9 Aug 2014 17:11:26 +0800 Subject: [PATCH] bugfix --- index.js | 5 +++++ lib/createCert.js | 1 + 2 files changed, 6 insertions(+) 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){