node.js asyncronous patterns and promise