senchalabs/connect — pull request #530 by timshadel (2012-04-06 05:03:08+00:00)
Title: Simplify downstream framework use of `connect()` and `listen`

This commit makes a small but significant change.

The `app` created inside of `connect()` is now an `Object` instead of a `Function`, and the `listen()` method makes its own closure to send to `http.createServer`.

This keeps all existing functionality the same—all tests pass—but really helps downstream frameworks.

- Allows `listen` to work directly in Connect extensions like Express
- Makes it easier for projects like [Pow](https://github.com/37signals/pow) to use Connect 2.x

The (tiny) changes to make Express work with this are also done for another pull request.