const KsMf = require('ksmf');
class DefaultController extends KsMf.app.Controller {
list(req, res) {
const externalController = this.helper.get({
name: 'AddressController',
path: 'controller',
module: 'person',
options: {
opt: this.opt
},
dependency: {
'helper': 'helper'
}
});
const data = externalController.list(req, res);
res.json({ data });
}
}
module.exports = DefaultController;This microframework uses KsDp allowing you to make use of integration patterns such as the IoC, in this way you can access any library or service of the project without having to load it or explicitly intanciate it.
The next recomended topic: Data Base.