stefanpenner/ember-cli — pull request #2008 by rwjblue (2014-09-16 11:28:23+00:00)
Title: Ensure that things loaded by server/index.js override addons.

Express will always process the first matching middleware.

A couple examples where this is bad:

* If a proxy was setup, it is always hit before any http-mocks you have setup (since it is itself an addon).
* If you want to serve static content (or another express middleware) from `server/index.js` you could never handle requests with an accept header including HTML. If you did, it would have hit the history state addon and just served up `app/index.html`.

In general, it is our policy that the application will always "trump" addon code.

Closes #1997.