Make it possible to pass custom middleware

To Broccoli server