js/controller.js
function Middleware(...middleware) {
    return (ctr) => {
        if (middleware != undefined) {
            let c = exports.globalKCState.getOrInsertController(ctr);
            c.middleware = middleware.concat(c.middleware);
        }
    };
}
function Middleware(...middleware) {
    return (ctr) => {
        if (middleware != undefined) {
            let c = exports.globalKCState.getOrInsertController(ctr);
            c.middleware = middleware.concat(c.middleware);
        }
    };
}
function Middleware ( ... middleware ) { return ( ctr ) => { if ( middleware != undefined ) { let c = exports . globalKCState . getOrInsertController ( ctr ) ; c . middleware = middleware . concat ( c . middleware ) ; } } ; }
Adds express middleware to run before mounting the controller
@param { Express.RequestHandler[] } middleware - Array of middleware to add.
Adds express middleware to run before mounting the controller