Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
node-http-proxy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
node-http-proxy
Commits
fb8c5abd
Commit
fb8c5abd
authored
Aug 02, 2010
by
Marak Squires
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated readme
parent
76d0649a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
README.md
README.md
+3
-0
No files found.
README.md
View file @
fb8c5abd
...
@@ -51,11 +51,14 @@ see the [demo](http://github.com/nodejitsu/node-http-proxy/blob/master/demo.js)
...
@@ -51,11 +51,14 @@ see the [demo](http://github.com/nodejitsu/node-http-proxy/blob/master/demo.js)
var http = require('http'),
var http = require('http'),
httpProxy = require('http-proxy');
httpProxy = require('http-proxy');
// create a proxy server with custom application logic
httpProxy.createServer(function (req, res, proxy) {
httpProxy.createServer(function (req, res, proxy) {
// Put your custom server logic here
// Put your custom server logic here
proxy.proxyRequest('localhost', '9000', req, res);
proxy.proxyRequest('localhost', '9000', req, res);
}).listen(8000);
}).listen(8000);
// create a regular http server and proxy its handler
http.createServer(function (req, res){
http.createServer(function (req, res){
var proxy = new httpProxy.HttpProxy;
var proxy = new httpProxy.HttpProxy;
proxy.watch(req, res);
proxy.watch(req, res);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment