Trying to understand how promisification works with BlueBird
问题 I'm trying to wrap my head around promises using the Bluebird library for Node.js. Below is a simple example that doesn't work as I would expect. var Promise = require("bluebird"); var myObj = { add: function(op1, op2) { return op1 + op2; } }; // Sync call to add method -> 7 console.log(myObj.add(3,4)); var myObjAsync = Promise.promisifyAll(myObj); // Async call to promisified add method -> nothing written to console myObjAsync.addAsync(2,3).then(function(data) { console.log(data); return