You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I don't want to use the connect server handler, but instead provide my own, I have to include the following hack to make connect work:
varhandler=handler_function_generator();handler.on(function(req,res,next){req.originalUrl=req.url;next();});handler.on(connect.cookieParser());// etc now I can use middleware
This is ok, but it would be great if the hack wasn't necessary. Or even if the following could work:
The issue with the above being that the connect() handler will never fire the next function as it doesn't expect to be used this way.
It would be really great if connect could easily be used in other frameworks in some form like the above, without feeling too hacky. It provides the most solid foundations for a node app at the moment, so it would be great if it could be used in more scenarios like this.
The text was updated successfully, but these errors were encountered:
As a library that pushes the ideas of middleware so nicely, it just feels like it should be possible to use as middleware itself. It shouldn't be more than a line or two to add the callback, and it would really help getting it to work with the framework I've been using. Completely understand if it somehow conflicts with the design goals though. Happy to submit a pull request and test case as well if it helps?
This is related to #646
If I don't want to use the connect server handler, but instead provide my own, I have to include the following hack to make connect work:
This is ok, but it would be great if the hack wasn't necessary. Or even if the following could work:
The issue with the above being that the
connect()
handler will never fire thenext
function as it doesn't expect to be used this way.It would be really great if connect could easily be used in other frameworks in some form like the above, without feeling too hacky. It provides the most solid foundations for a node app at the moment, so it would be great if it could be used in more scenarios like this.
The text was updated successfully, but these errors were encountered: