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
6c6fec09
Commit
6c6fec09
authored
Sep 29, 2011
by
Charlie Robbins
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #118 from nodejitsu/gh-117
[fix] Examples have working require paths now.
parents
5ad77395
2e8d4c6e
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
13 additions
and
13 deletions
+13
-13
examples/http/proxy-https-to-http.js
examples/http/proxy-https-to-http.js
+1
-1
examples/http/proxy-https-to-https.js
examples/http/proxy-https-to-https.js
+2
-2
examples/middleware/bodyDecoder-middleware.js
examples/middleware/bodyDecoder-middleware.js
+2
-2
examples/middleware/jsonp-middleware.js
examples/middleware/jsonp-middleware.js
+3
-3
examples/middleware/url-middleware.js
examples/middleware/url-middleware.js
+2
-2
examples/middleware/url-middleware2.js
examples/middleware/url-middleware2.js
+3
-3
No files found.
examples/http/proxy-https-to-http.js
View file @
6c6fec09
...
@@ -29,7 +29,7 @@ var https = require('https'),
...
@@ -29,7 +29,7 @@ var https = require('https'),
util
=
require
(
'
util
'
),
util
=
require
(
'
util
'
),
colors
=
require
(
'
colors
'
),
colors
=
require
(
'
colors
'
),
httpProxy
=
require
(
'
../../lib/node-http-proxy
'
),
httpProxy
=
require
(
'
../../lib/node-http-proxy
'
),
helpers
=
require
(
'
./../test/helpers
'
);
helpers
=
require
(
'
.
.
/../test/helpers
'
);
var
opts
=
helpers
.
loadHttps
();
var
opts
=
helpers
.
loadHttps
();
...
...
examples/http/proxy-https-to-https.js
View file @
6c6fec09
...
@@ -29,7 +29,7 @@ var https = require('https'),
...
@@ -29,7 +29,7 @@ var https = require('https'),
util
=
require
(
'
util
'
),
util
=
require
(
'
util
'
),
colors
=
require
(
'
colors
'
),
colors
=
require
(
'
colors
'
),
httpProxy
=
require
(
'
../../lib/node-http-proxy
'
),
httpProxy
=
require
(
'
../../lib/node-http-proxy
'
),
helpers
=
require
(
'
./../test/helpers
'
);
helpers
=
require
(
'
.
.
/../test/helpers
'
);
var
opts
=
helpers
.
loadHttps
();
var
opts
=
helpers
.
loadHttps
();
...
...
examples/middleware/bodyDecoder-middleware.js
View file @
6c6fec09
var
Store
=
require
(
'
.
/lib
/store
'
)
var
Store
=
require
(
'
.
./helpers
/store
'
)
,
http
=
require
(
'
http
'
)
,
http
=
require
(
'
http
'
)
http
.
createServer
(
new
Store
().
handler
()).
listen
(
7531
,
function
()
{
http
.
createServer
(
new
Store
().
handler
()).
listen
(
7531
,
function
()
{
...
@@ -42,7 +42,7 @@ http.createServer(new Store().handler()).listen(7531, function () {
...
@@ -42,7 +42,7 @@ http.createServer(new Store().handler()).listen(7531, function () {
//don't worry about incoming contont type
//don't worry about incoming contont type
//bodyParser.parse[''] = JSON.parse
//bodyParser.parse[''] = JSON.parse
require
(
'
http-proxy
'
).
createServer
(
require
(
'
../../lib/node-
http-proxy
'
).
createServer
(
//refactor the body parser and re-streamer into a separate package
//refactor the body parser and re-streamer into a separate package
bodyParser
(),
bodyParser
(),
//body parser absorbs the data and end events before passing control to the next
//body parser absorbs the data and end events before passing control to the next
...
...
examples/middleware/jsonp-middleware.js
View file @
6c6fec09
var
Store
=
require
(
'
.
/lib
/store
'
)
var
Store
=
require
(
'
.
./helpers
/store
'
)
,
http
=
require
(
'
http
'
)
,
http
=
require
(
'
http
'
)
//
//
...
@@ -24,7 +24,7 @@ var Store = require('./lib/store')
...
@@ -24,7 +24,7 @@ var Store = require('./lib/store')
http
.
createServer
(
new
Store
().
handler
()).
listen
(
7531
)
http
.
createServer
(
new
Store
().
handler
()).
listen
(
7531
)
require
(
'
http-proxy
'
).
createServer
(
require
(
'
../../lib/node-
http-proxy
'
).
createServer
(
require
(
'
connect-jsonp
'
)(
true
),
require
(
'
connect-jsonp
'
)(
true
),
'
localhost
'
,
7531
'
localhost
'
,
7531
).
listen
(
1337
)
).
listen
(
1337
)
examples/middleware/url-middleware.js
View file @
6c6fec09
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
var
util
=
require
(
'
util
'
),
var
util
=
require
(
'
util
'
),
colors
=
require
(
'
colors
'
),
colors
=
require
(
'
colors
'
),
http
=
require
(
'
http
'
),
http
=
require
(
'
http
'
),
httpProxy
=
require
(
'
http-proxy
'
);
httpProxy
=
require
(
'
../../lib/node-
http-proxy
'
);
//
//
// Now we set up our proxy.
// Now we set up our proxy.
...
...
examples/middleware/url-middleware2.js
View file @
6c6fec09
var
util
=
require
(
'
util
'
),
var
util
=
require
(
'
util
'
),
colors
=
require
(
'
colors
'
),
colors
=
require
(
'
colors
'
),
http
=
require
(
'
http
'
),
http
=
require
(
'
http
'
),
httpProxy
=
require
(
'
http-proxy
'
),
httpProxy
=
require
(
'
../../lib/node-
http-proxy
'
),
Store
=
require
(
'
.
/lib
/store
'
)
Store
=
require
(
'
.
./helpers
/store
'
)
http
.
createServer
(
new
Store
().
handler
()).
listen
(
7531
)
http
.
createServer
(
new
Store
().
handler
()).
listen
(
7531
)
...
...
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