express-middleware-compositor
v1.1.1
Published
Composite express middlewares with hooks
Downloads
6
Readme
Usage
var express = require("express");
var CookieParser = {
displayName: "CookieParser",
beforeAll: function () {
return express.cookieParser();
}
};
function Session () {
this.superclass.constructor.apply(this, arguments);
};
Session.prototype.displayName = "Session";
Session.prototype.beforeCookieParser = function () {
return express.session();
};
var compositor = require("express-middleware-compositor");
var app = compositor();
app.inject(Session);
app.inject(CookieParser);
app.install().listen(8080);