Simple, use bluebird . Any file that requires the use of promises gets the value of bluebird.
var Promise = require('bluebird'); Promise.aPromise() .then(function () { console.log('ftw!'); }) .catch(function(err) { console.log(err, 'do not forget to catch errors. ever!'); })
As for the generators, we are out of luck. bluebird requires a minimum of v0.12+ , and while recording, the lambda is still stuck in node v0.10.36
source share