Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Dec 10, 2009
1 parent 39b0e43 commit 9b8d417
Showing 1 changed file with 28 additions and 10 deletions.
38 changes: 28 additions & 10 deletions Readme.md
Expand Up @@ -31,16 +31,22 @@

## Examples

require.paths.unshift("./lib")
require('express')

set('views', dirname(__filename) + '/views')

get('/user/:id?', function() {
if (param('id'))
return 'Viewing user ' + param('id')
return 'Your user account'
})
require.paths.unshift("./lib")
require('express')
require('express/plugins')

use(MethodOverride)
use(ContentLength)
use(Logger)
set('views', dirname(__filename) + '/views')

get('/user/:id?', function() {
if (param('id'))
return 'Viewing user ' + param('id')
return 'Your user account'
})

run()

## Settings

Expand All @@ -59,6 +65,18 @@ you to chain iterations on array-like objects and objects.
.select(function(name){ return name.charAt(0) == 't' })
.reject(function(name){ return name.length < 4 })
.first()
## Plugins

Express middleware and extensions take the form of a **Plugin**.
The difference with middleware and **Plugins** is that they may
interact with eachother, and Express in ways simple middleware cannot.

Currently the following core plugins are available:

* CommonLogger
* MethodOverride
* ContentLength

## Running Tests

Expand Down

0 comments on commit 9b8d417

Please sign in to comment.