visionmedia/express — pull request #1471 by shesek (2013-01-14 14:29:39+00:00)
Title: Allow to pass configuration function to express()

The configure() function is quite handy, especially in CoffeeScript with `@` being used to access properties on this.

I find myself repeatedly creating an app and running configure() on it, than running the rest of the code inside a configure() function, so I'll be in the app context, e.g.:

```coffee
app = express()
app.configure ->
@use express.static __dirname
@set '....'
# ...
```

What if `express()` simply allowed to give it a function, and immediately execute it in the context of the app?

```coffee
express ->
@use express.static __dirname
@set '....'
# ...
```