Allow multiple middlewares to be defined and executed
Exec fn in context of app, if available