routing
class BaseController {
constructor(req, res, next) {
console.log("-------------", req);
this.req = req;
this.res = res;
this.next = next;
this.data = req.body || req.query; //
}
}
module.exports = BaseController();
how can the parameters such as req routed by everyone be passed into the controller and new Login (req, res, next) when the module is imported?
Thank you