File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ var help = [
13
13
"" ,
14
14
"options:" ,
15
15
" --port PORT Port that the proxy server should run on" ,
16
+ " --host HOST Host that the proxy server should run on" ,
16
17
" --target HOST:PORT Location of the server the proxy will target" ,
17
18
" --config OUTFILE Location of the configuration file for the proxy server" ,
18
19
" --silent Silence the log output from the proxy server" ,
@@ -25,6 +26,7 @@ if (argv.h || argv.help || Object.keys(argv).length === 2) {
25
26
26
27
var location , config = { } ,
27
28
port = argv . port || 80 ,
29
+ host = argv . host || undefined ,
28
30
target = argv . target ;
29
31
30
32
//
@@ -77,7 +79,11 @@ else {
77
79
//
78
80
// Start the server
79
81
//
80
- server . listen ( port ) ;
82
+ if ( ! host ) {
83
+ server . listen ( port ) ;
84
+ } else {
85
+ server . listen ( port , host ) ;
86
+ }
81
87
82
88
//
83
89
// Notify that the server is started
You can’t perform that action at this time.
0 commit comments