Hi this is my method in a node js file:
exports.start = function() {
console.log(' in start of sender.js');
});
How can I call this method in the same js file? I tried calling start() and exports.start() but not successful.
Use this code:
var start = exports.start = function() {
console.log(' in start of sender.js');
});
or
function start() {
console.log(' in start of sender.js');
});
exports.start = start;
//you can call start();