Skip to content

Commit

Permalink
Added blocks.middleware.
Browse files Browse the repository at this point in the history
As discussed in astoilkov#95.
  • Loading branch information
Joscha Rohmann committed Nov 30, 2015
1 parent 9bd1f1d commit 7fa3145
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/node/methods.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
define([
'../core',
'./Server',
], function (blocks, Server) {
'./Middleware'
], function (blocks, Server, Middleware) {
blocks.server = function (options) {
return new Server(options);
};

blocks.middleware = function (options) {
var middleware = new Middleware(options);
return blocks.bind(middleware.tryServePage, middleware);
};

blocks.static = function (options) {

};
Expand Down

0 comments on commit 7fa3145

Please sign in to comment.