A function that will be called the moment the application mounts the controller, and that is in charge of registering routes and middlewares.
const myController = controller((app) => {
const router = app.getRouter();
const ctrl = new MyController();
return router.get('...', ctrl.doSomething()).post('...', ctrl.doSomethingElse());
});
// ...
container.mount('/charo', myController);
Generated using TypeDoc
Generates a routes controller for the application container to mount.