TryGhost/Ghost — pull request #1372 by hswolff (2013-11-01 02:51:39+00:00)
Title: Moves all middleware into middleware module.

This PR moves all middleware functions that were previously in core/server.js into core/server/middleware.js.

This was done to improve the readability of core/server.js and to centralize all middleware functionality to one module.

Aside from moving the functions, they were modified to use the express application instance attached to the ghost singleton: ghost.server.