Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyettinger committed Oct 22, 2012
1 parent 90572c0 commit 166a2b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -16,7 +16,7 @@ Installing

See the package on npm: https://npmjs.org/package/express-force-domain

Usage
Usage with Express
----

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):
Expand Down Expand Up @@ -50,6 +50,9 @@ For parked domains you want to redirect, this assumes example2.com points to the

Requests for http://example2.com, http://www.example2.com, and http://example.com will all redirect to http://www.example.com.

Usage with Connect
----

You can also use as middleware with connect and app.use(), if you are not using express:

app.use(require('express-force-domain')('http://www.example.com') );
Expand Down
6 changes: 4 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "express-force-domain",
"version": "0.0.4",
"version": "0.0.5",
"description": "Force express 3.x or Connect to use a specific domain. Good for adding or removing www. and handling parked domains that redirect to your main domain.",
"main": "./lib/express-force-domain.js",
"scripts": {
Expand All @@ -13,7 +13,9 @@
"keywords": [
"express",
"domains",
"redirect"
"redirect",
"connect",
"seo"
],
"author": "Anthony Ettinger (chovy)",
"license": "MIT"
Expand Down

0 comments on commit 166a2b1

Please sign in to comment.