1

I want to call a method controller B, says it's conB.js and look like this

module.exports.verify = function(req,res,next){

}

Then now I'm in conA.js, how can I call verify of conB and pass arguments to it?

I know firstly I have to include it,

var ConB = require('ConB');
// but then? 
Jessie Emerson
  • 733
  • 2
  • 11
  • 23

1 Answers1

0

The ConB object will contain the exports from that controller so you just call the method on be object

ConB.verify(...)
hawkstrider
  • 3,714
  • 16
  • 26