File tree 3 files changed +7
-6
lines changed 3 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ var proxy = require('../../index'); // require('http-proxy-middleware');
7
7
/**
8
8
* Configure proxy middleware
9
9
*/
10
- var chuckNorrisApiProxy = proxy ( '/jokes' , {
10
+ var ChuckNorrisProxy = proxy ( '/jokes' , {
11
11
target : 'http://api.icndb.com' ,
12
12
changeOrigin : true , // for vhosted sites, changes host header to match to target's host
13
13
logLevel : 'debug'
@@ -20,7 +20,7 @@ browserSync.init({
20
20
server : {
21
21
baseDir : './' ,
22
22
port : 3000 ,
23
- middleware : [ chuckNorrisApiProxy ] ,
23
+ middleware : [ ChuckNorrisProxy ] ,
24
24
} ,
25
25
startPath : '/jokes/random/5?limitTo=[nerdy]'
26
26
} ) ;
Original file line number Diff line number Diff line change @@ -8,17 +8,18 @@ var proxy = require('../../index'); // require('http-proxy-middleware');
8
8
/**
9
9
* Configure proxy middleware
10
10
*/
11
- var chuckNorrisApiProxy = proxy ( '/jokes' , {
11
+ var ChuckNorrisProxy = proxy ( '/jokes' , {
12
12
target : 'http://api.icndb.com' ,
13
13
changeOrigin : true , // for vhosted sites, changes host header to match to target's host
14
14
logLevel : 'debug'
15
15
} ) ;
16
+
16
17
var app = connect ( ) ;
17
18
18
19
/**
19
20
* Add the proxy to connect
20
21
*/
21
- app . use ( chuckNorrisApiProxy ) ;
22
+ app . use ( ChuckNorrisProxy ) ;
22
23
23
24
http . createServer ( app ) . listen ( 3000 ) ;
24
25
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ var proxy = require('../../index'); // require('http-proxy-middleware');
7
7
/**
8
8
* Configure proxy middleware
9
9
*/
10
- var chuckNorrisApiProxy = proxy ( '/jokes' , {
10
+ var ChuckNorrisProxy = proxy ( '/jokes' , {
11
11
target : 'http://api.icndb.com' ,
12
12
changeOrigin : true , // for vhosted sites, changes host header to match to target's host
13
13
logLevel : 'debug'
@@ -18,7 +18,7 @@ var app = express();
18
18
/**
19
19
* Add the proxy to express
20
20
*/
21
- app . use ( chuckNorrisApiProxy ) ;
21
+ app . use ( ChuckNorrisProxy ) ;
22
22
23
23
app . listen ( 3000 ) ;
24
24
You can’t perform that action at this time.
0 commit comments