gruntjs/grunt-contrib-server — pull request #3 by sindresorhus (2012-10-27 22:21:27+00:00)
Title: Add ability to override middleware

This would give users ability to add any middleware they want by just defining the option `middleware` with a function that returns an array of middlewares. The reason I choose this was to be able to access the merged options in the middleware and give access to `connect`.

See Gruntfile for example usage.

Examples of when it could be useful:
https://github.com/yeoman/yeoman/pull/670
https://github.com/yeoman/yeoman/pull/469

Users could then make use of any middleware they wanted without having to create a duplicate server task.