diff --git a/lib/Server.js b/lib/Server.js index 44fd11e660..ac1f9c16f7 100644 --- a/lib/Server.js +++ b/lib/Server.js @@ -210,10 +210,15 @@ function Server(compiler, options) { magicHtml: function() { app.get("*", this.serveMagicHtml.bind(this)); + }.bind(this), + + setup: function() { + if(typeof options.setup === "function") + options.setup(app); }.bind(this) }; - var defaultFeatures = ["headers", "middleware"]; + var defaultFeatures = ["setup", "headers", "middleware"]; if(options.proxy) defaultFeatures.push("proxy"); if(options.historyApiFallback)