3 ms·
Jack: A port of Rack to JavaScript
- apgwoz 18y agoCall me a cynic, but can we just have one standard way of doing this sort of thing across all platforms? With (R|J)ack, we return a list/tuple of [response code, headers, iterable], and in WSGI compatible things, we call function(response code, headers) and return the data. Almost exactly the same, but completely different.
- tlrobinson 18y ago(I'm the creator of Jack) I agree, but WSGI and Rack did it differently, and I preferred the Rack way, so I chose that. FWIW, WSGI 2.0 (http://wsgi.org/wsgi/WSGI_2.0 http://wsgi.org/wsgi/WSGI_2.0) will do it like Rack/Jack (except it still uses a list of tuples instead of a hash for headers. I prefer the hash, it's simpler and maps more directly)
- apgwoz 18y agoThanks for the link to WSGI 2.0. I think that's a step in the right direction, though I agree with the hash table instead of a list of tuples...