Skip to content

Commit

Permalink
connect example
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyettinger committed Nov 9, 2012
1 parent f232130 commit 1610f1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -23,7 +23,7 @@ You can also use as middleware with connect and app.use(), if you are not using


Setup a middleware in app.js before all your other routes are defined, and pass the full url to the homepage as an argument: (including port if other than 80): Setup a middleware in app.js before all your other routes are defined, and pass the full url to the homepage as an argument: (including port if other than 80):


app.use(require('express-force-domain')('http://www.example.com') ); app.use( require('express-force-domain')('http://www.example.com') );


or or


Expand All @@ -37,7 +37,7 @@ or alternative port
Note, be sure to put the app.use statement above the app.router. Note, be sure to put the app.use statement above the app.router.


var cfg = require('./config') var cfg = require('./config')
, force = require('express-force-domain'); , force = require('express-force-domain');


app.use( force(cfg.site_url) ); app.use( force(cfg.site_url) );
... ...
Expand All @@ -46,7 +46,7 @@ Note, be sure to put the app.use statement above the app.router.
Alternative: Alternative:


var site_url = 'http://www.example.com' var site_url = 'http://www.example.com'
, force = require('express-force-domain'); , force = require('express-force-domain');


app.use( force(site_url) ); app.use( force(site_url) );


Expand Down

0 comments on commit 1610f1a

Please sign in to comment.