Skip to content

Commit

Permalink
[fix] Fixed require paths in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jfhbrook committed Sep 29, 2011
1 parent 5ad7739 commit 2e8d4c6
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/http/proxy-https-to-http.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var https = require('https'),
util = require('util'),
colors = require('colors'),
httpProxy = require('../../lib/node-http-proxy'),
helpers = require('./../test/helpers');
helpers = require('../../test/helpers');

var opts = helpers.loadHttps();

Expand Down
4 changes: 2 additions & 2 deletions examples/http/proxy-https-to-https.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ var https = require('https'),
util = require('util'),
colors = require('colors'),
httpProxy = require('../../lib/node-http-proxy'),
helpers = require('./../test/helpers');
helpers = require('../../test/helpers');

var opts = helpers.loadHttps();

Expand All @@ -53,4 +53,4 @@ httpProxy.createServer(8000, 'localhost', {
}).listen(8080);

util.puts('https proxy server'.blue + ' started '.green.bold + 'on port '.blue + '8080'.yellow);
util.puts('https server '.blue + 'started '.green.bold + 'on port '.blue + '8000 '.yellow);
util.puts('https server '.blue + 'started '.green.bold + 'on port '.blue + '8000 '.yellow);
4 changes: 2 additions & 2 deletions examples/middleware/bodyDecoder-middleware.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

var Store = require('./lib/store')
var Store = require('../helpers/store')
, http = require('http')

http.createServer(new Store().handler()).listen(7531, function () {
Expand Down Expand Up @@ -42,7 +42,7 @@ http.createServer(new Store().handler()).listen(7531, function () {
//don't worry about incoming contont type
//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
bodyParser(),
//body parser absorbs the data and end events before passing control to the next
Expand Down
6 changes: 3 additions & 3 deletions examples/middleware/jsonp-middleware.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
var Store = require('./lib/store')
var Store = require('../helpers/store')
, http = require('http')

//
Expand All @@ -24,7 +24,7 @@ var Store = require('./lib/store')

http.createServer(new Store().handler()).listen(7531)

require('http-proxy').createServer(
require('../../lib/node-http-proxy').createServer(
require('connect-jsonp')(true),
'localhost', 7531
).listen(1337)
).listen(1337)
4 changes: 2 additions & 2 deletions examples/middleware/url-middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
var util = require('util'),
colors = require('colors'),
http = require('http'),
httpProxy = require('http-proxy');
httpProxy = require('../../lib/node-http-proxy');

//
// Now we set up our proxy.
Expand Down Expand Up @@ -55,4 +55,4 @@ http.createServer(function (req, res) {

// And finally, some colored startup output.
util.puts('http proxy server'.blue + ' started '.green.bold + 'on port '.blue + '8000'.yellow);
util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '9000 '.yellow);
util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '9000 '.yellow);
6 changes: 3 additions & 3 deletions examples/middleware/url-middleware2.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
var util = require('util'),
colors = require('colors'),
http = require('http'),
httpProxy = require('http-proxy'),
Store = require('./lib/store')
httpProxy = require('../../lib/node-http-proxy'),
Store = require('../helpers/store')

http.createServer(new Store().handler()).listen(7531)

Expand All @@ -27,4 +27,4 @@ http.createServer(function (req, res) {

// And finally, some colored startup output.
util.puts('http proxy server'.blue + ' started '.green.bold + 'on port '.blue + '8000'.yellow);
util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '9000 '.yellow);
util.puts('http server '.blue + 'started '.green.bold + 'on port '.blue + '9000 '.yellow);

0 comments on commit 2e8d4c6

Please sign in to comment.