mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
update to docs and package.json
This commit is contained in:
parent
b195a16406
commit
d15bba4c1d
@ -35,7 +35,7 @@ Let's suppose you were running multiple http application servers, but you only w
|
|||||||
var http = require('http'),
|
var http = require('http'),
|
||||||
httpProxy = require('http-proxy');
|
httpProxy = require('http-proxy');
|
||||||
|
|
||||||
httpProxy.createServer('9000', 'localhost').listen(8000);
|
httpProxy.createServer(9000, 'localhost').listen(8000);
|
||||||
|
|
||||||
http.createServer(function (req, res){
|
http.createServer(function (req, res){
|
||||||
res.writeHead(200, {'Content-Type': 'text/plain'});
|
res.writeHead(200, {'Content-Type': 'text/plain'});
|
||||||
@ -54,7 +54,7 @@ see the [demo](http://github.com/nodejitsu/node-http-proxy/blob/master/demo.js)
|
|||||||
// create a proxy server with custom application logic
|
// 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('9000', 'localhost', req, res);
|
proxy.proxyRequest(9000, 'localhost', req, res);
|
||||||
}).listen(8000);
|
}).listen(8000);
|
||||||
|
|
||||||
http.createServer(function (req, res){
|
http.createServer(function (req, res){
|
||||||
|
|||||||
@ -1,11 +1,15 @@
|
|||||||
{
|
{
|
||||||
"name": "http-proxy",
|
"name": "http-proxy",
|
||||||
"description": "A full-featured http reverse proxy for node.js",
|
"description": "A full-featured http reverse proxy for node.js",
|
||||||
"version": "0.1.5",
|
"version": "0.1.6",
|
||||||
"author": "Charlie Robbins <charlie.robbins@gmail.com>",
|
"author": "Charlie Robbins <charlie.robbins@gmail.com>",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
{ "name": "Marak Squires", "email": "marak.squires@gmail.com" }
|
{ "name": "Marak Squires", "email": "marak.squires@gmail.com" }
|
||||||
],
|
],
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "http://github.com/nodejitsu/node-http-proxy.git"
|
||||||
|
},
|
||||||
"keywords": ["reverse", "proxy", "http"],
|
"keywords": ["reverse", "proxy", "http"],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"colors": ">= 0.3.0"
|
"colors": ">= 0.3.0"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user