Function controllerProvider

Creates a "controller provider", which is a controller that can configure/extend the container before the application mounts it.

class MyController {}
const myControllerProvider = controllerProvider((app) => {
app.set('myController', () => new MyController());
return controller(() => {
const ctrl = app.get<MyController>('myController');
const router = app.getRouter();
return router.get('/', ctrl.doSomething());
});
});