Example code utilizing Promises and the Q library with Node.js