i am new on java-Script programming and i develope NodeJs. I wanna call one Function, which requires functions as parameter:
Will be called:
module.exports = {
//pool is has been defined
connection: function() {
pool.getConnection(function(err, conn) {
return conn;
});
}
};
At next other node.js file, which call that:
var connectionPool = require('./connPool.js');
var connection = connectionPool.connection;
var tempConnection = connection.getConnection(???);
I need return-value from method "getConnection" (above this code) How can i get it??
Thx.