How do you call a function from another function in the module.exports declaration?
I have an MVC node js structure and a controller called TestController.js. I want to access the method in the controller, but using the this gives below error:
cannot call getName undefined method
"use strict" module.exports = { myName : function(req, res, next) {
How do I access methods in the controller?
source share