import { Container } from 'inversify' ; import { controller , httpGet } from 'inversify-express-utils' ; import * as express from 'express' ; export function controllerFactory ( container ) { @ controller ( '/' ) class TestController { @ httpGet ( '/' , container . get < express . RequestHandler > ( 'CustomMiddleware' ) , container . get < express . RequestHandler > ( 'Morgan' ) ) public getUserName ( req , res ) { res . send ( req . user . username ) ; } } return TestController ; }