You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-2
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,8 @@ There are several ways to use node-http-proxy; the library is designed to be fle
41
41
4. As a forward-proxy with a reverse proxy
42
42
5. From the command-line as a proxy daemon
43
43
44
+
See the [demo](http://github.com/nodejitsu/node-http-proxy/blob/master/demo.js) for further examples.
45
+
44
46
### Setup a basic stand-alone proxy server
45
47
<pre>
46
48
var http = require('http'),
@@ -57,8 +59,6 @@ There are several ways to use node-http-proxy; the library is designed to be fle
57
59
}).listen(9000);
58
60
</pre>
59
61
60
-
See the [demo](http://github.com/nodejitsu/node-http-proxy/blob/master/demo.js) for further examples.
61
-
62
62
### Setup a stand-alone proxy server with custom server logic
63
63
<pre>
64
64
var http = require('http'),
@@ -151,6 +151,21 @@ Sometimes in addition to a reverse proxy, you may want your front-facing server
151
151
152
152
The forwarding option can be used in conjunction with the proxy table options by simply including both the 'forward' and 'router' properties in the options passed to 'createServer'.
153
153
154
+
### Using node-http-proxy from the command line
155
+
When you install this package with npm, a node-http-proxy binary will become available to you. Using this binary is easy with some simple options:
156
+
<pre>
157
+
usage: node-http-proxy [options]
158
+
159
+
All options should be set with the syntax --option=value
160
+
161
+
options:
162
+
--port PORT Port that the proxy server should run on
163
+
--target HOST:PORT Location of the server the proxy will target
164
+
--config OUTFILE Location of the configuration file for the proxy server
165
+
--silent Silence the log output from the proxy server
166
+
-h, --help You're staring at it
167
+
</pre>
168
+
154
169
<br/>
155
170
### Why doesn't node-http-proxy have more advanced features like x, y, or z?
0 commit comments