File tree Expand file tree Collapse file tree 3 files changed +13
-5
lines changed
Expand file tree Collapse file tree 3 files changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,14 @@ The `$` passed to your transform method is a JQuery like object using [cheerio](
6969
7070![ alt text] ( docs/bbc-news-fake-homepage.png " BBC News actual homepage ")
7171
72+ ### Run the example
73+
74+ You can try the example for yourself using the following command:
75+
76+ ```
77+ node ./node_modules/node-iframe-replacement/example/server.js
78+ ```
79+
7280## Auto base tag injection
7381
7482To ensure the source scripts, styles and images load within your site a base tag is automatically injected ``` <base href="http://www.bbc.co.uk/news" /> ``` .
Original file line number Diff line number Diff line change @@ -30,7 +30,9 @@ function Server() {
3030 } ) ;
3131
3232 // start the server
33- app . listen ( 8080 ) ;
33+ app . listen ( 8080 , function ( ) {
34+ console . log ( 'Server running... Visit http://localhost:8080 in your browser' ) ;
35+ } ) ;
3436}
3537
3638module . exports = new Server ( ) ;
Original file line number Diff line number Diff line change 44 "description" : " NodeJS + Express replacement for the HTML iframe" ,
55 "main" : " index.js" ,
66 "scripts" : {
7- "test " : " echo \" Error: no test specified yet! \" && exit 1 "
7+ "example " : " node example/server.js "
88 },
99 "repository" : {
1010 "type" : " git" ,
3333 "dependencies" : {
3434 "cheerio" : " ^0.20.0" ,
3535 "node-cache" : " ^3.2.1" ,
36- "request-promise" : " ^3.0.0"
37- },
38- "devDependencies" : {
36+ "request-promise" : " ^3.0.0" ,
3937 "express" : " ^4.14.0" ,
4038 "express-handlebars" : " ^3.0.0"
4139 }
You can’t perform that action at this time.
0 commit comments