webpack/webpack-dev-server — pull request #47 by sbrekken (2014-08-20 11:08:53+00:00)
Title: Custom middleware.

This patch includes two changes that together solve #35.

Firstly it adds a new option `noContentBase` (a bit unsure about the name) which prevents webpack-dev-server from serving up content from the `contentBase` option and instead expects a custom middleware to be used to serve requests.

```javascript
var app = express()
app.get('*', function() {
res.send('Hello world!')
})

var server = new WebpackDevServer(webpack(config), {
hot: true,
noContentBase: true
})

server.app.use(app)
server.listen(8080)
```

This would serve webpack bundles as expected and return "Hello world" for anything else.

The second change is formalizing the ability to add custom middleware by proxying `Server.app.use` as `Server.use`.