remove router array middleware support #1315

Closed
tj opened this Issue Sep 3, 2012 · 10 comments

Projects

None yet

7 participants

@tj
Member
tj commented Sep 3, 2012

currently we support stuff like:

var common = [foo, bar, baz];
app.get('/something', common, fn);
app.get('/else', common, fn);

though personally I don't use this much, let me know if you do

@jonathanong
Member

i do, actually, since i create very specific middleware and reuse them frequently, and like to package them into an array.

@jarradseers

Hi TJ,

I use this all the time, if you see the examples in my express-load module you will see that this is very useful for large MVC structures, separating routes from controllers and allowing globally used middleware.

Kind regards,
Jarrad Seers

On 4/09/2012, at 4:09 AM, TJ Holowaychuk notifications@github.com wrote:

currently we support stuff like:

var common = [foo, bar, baz];
app.get('/something', common, fn);
app.get('/else', common, fn);
though personally I don't use this much, let me know if you do


Reply to this email directly or view it on GitHub.

@tj
Member
tj commented Sep 3, 2012

cool thanks guys, wanted to make sure people were using this otherwise it would be worth removing

@robby
robby commented Sep 11, 2012

we also have a very large app and use this often for securing routes and
handling common functionality.

thanks

On Sep 3, 2012, at 9:09 AM, TJ Holowaychuk notifications@github.com wrote:

currently we support stuff like:

var common = [foo, bar, baz];app.get('/something', common,
fn);app.get('/else', common, fn);

though personally I don't use this much, let me know if you do


Reply to this email directly or view it on
GitHubhttps://github.com/visionmedia/express/issues/1315.

@ovaillancourt

Chiming in (slightly late) - we do use that feature a lot too here, mostly to split processing steps in "building blocks" for more complicated request.

I was actually wondering if it would be possible to have the same feature for .use, seems relatively straightforward to implement.

@antitoxic

Yep, i also use it as "filters". Really useful stuff and a eye-opener for me that things can be done in this way.

@tj
Member
tj commented Oct 15, 2012

haha k k ill keep it

@RexMorgan

Sounds like this feature should stay, and this issue should not? 😄

@ovaillancourt

agreed :P.

@tj
Member
tj commented Feb 11, 2013

:D

@tj tj closed this Feb 11, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment