promise

How do I do a deferred response from a node.js express action handler?

Using Express (for node.js) How do I write a response after a callback? The following is a minimal example. posix.cat is a function that returns a promise, up does something to the result, and I want to send that as the response. require.paths.unshift('lib'); require('express'); var posix = require('posix'); get('/', function () { ...

What is the benefit of a 'promise' abstraction in CommonJS?

I'm reading this article and the section on the promise abstraction seems a little overly complicated to me. The following is given as an example: requestSomeData("http://example.com/foo") // returns a promise for the response .then(function(response){ // ‘then’ is used to provide a promise handler return JSON.parse(respons...

Client-side javascript to support promises, futures, etc.

I'm really interested in implementing Promises and related features in client-side Javascript. From what I've seen, the focus in implementing these technologies in Javascript seems to be on server-side javascript (SSJS) with Promises in CommonJS. Ideally for me, I would find a solution that works well with jQuery or Google Closure Librar...