Skip to content


Subversion checkout URL

You can clone with
Download ZIP


connect ? #1

weepy opened this Issue · 5 comments

2 participants


is connect going to be rewritten using stack ?


Not that I know of. I know TJ is planning to rewrite or heavily refactor connect, but I don't think he wants to base it on stack. Also, by design stack will never come bundled with middleware like connect does.


ah - i see - out of interest - how would u need to change Stack to make it more Connect ready? From my far off view, it sounded like a perfect fit :-)


It's meant to be a near drop-in replacement for the core connect dispatcher. The middleware format is the same. You can use connect middlewares with stack and my creationix middlewares can be used with connect.

There are some slightly different semantics with regard to error handling. Connect routes errors to the first middleware that has the proper signature. In stack, it's an explicit error handling function that's attached to the stack function.


So does that mean that a Connect v2 couldn't quite work with Stack as it is, and equally Stack couldn't be easily modified (in a sane way) to support that same Connect functionality (matching sigs) ?


It's not a big deal. Most apps never have more than one error handler and it's app specific. Stack and Connect already have different external APIs, Stack returns a handler function where Connect is a subclass of HTTP.Server. The interop is that all normal middleware can be used with either.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.