I have a function
exports.myfunction = function(){
connection.open(function (error, client) {
connection.authenticate(user, pass, function (err, val) {
if (err) {
return 0;
} else {
return 1;
}
}
}
}
and in another file I want to see the output of this function 0/1. How I can pass this value to the parent function?