Skip to content

Commit e613b03

Browse files
committed
Merge pull request #279 from jnv/setup
Add setup option to prepend custom middlewares
2 parents a8e4ab8 + 6e0e95c commit e613b03

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/Server.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,15 @@ function Server(compiler, options) {
210210

211211
magicHtml: function() {
212212
app.get("*", this.serveMagicHtml.bind(this));
213+
}.bind(this),
214+
215+
setup: function() {
216+
if(typeof options.setup === "function")
217+
options.setup(app);
213218
}.bind(this)
214219
};
215220

216-
var defaultFeatures = ["headers", "middleware"];
221+
var defaultFeatures = ["setup", "headers", "middleware"];
217222
if(options.proxy)
218223
defaultFeatures.push("proxy");
219224
if(options.historyApiFallback)

0 commit comments

Comments
 (0)