Skip to content

Commit 6ac0525

Browse files
committed
Merge pull request #695 from outime/patch-1
Removed duplicated imported dependencies
2 parents fc73828 + 0e64568 commit 6ac0525

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ An object will be returned with four values:
4141
Is it then possible to proxy requests by calling these functions
4242

4343
```javascript
44-
require('http').createServer(function(req, res) {
44+
http.createServer(function(req, res) {
4545
proxy.web(req, res, { target: 'http://mytarget.com:8080' });
4646
});
4747
```
@@ -105,7 +105,7 @@ var proxy = httpProxy.createProxyServer({});
105105
// a web request to the target passed in the options
106106
// also you can use `proxy.ws()` to proxy a websockets request
107107
//
108-
var server = require('http').createServer(function(req, res) {
108+
var server = http.createServer(function(req, res) {
109109
// You can define here your custom logic to handle the request
110110
// and then proxy the request.
111111
proxy.web(req, res, { target: 'http://127.0.0.1:5060' });
@@ -140,7 +140,7 @@ proxy.on('proxyReq', function(proxyReq, req, res, options) {
140140
proxyReq.setHeader('X-Special-Proxy-Header', 'foobar');
141141
});
142142

143-
var server = require('http').createServer(function(req, res) {
143+
var server = http.createServer(function(req, res) {
144144
// You can define here your custom logic to handle the request
145145
// and then proxy the request.
146146
proxy.web(req, res, {

0 commit comments

Comments
 (0)