Skip to content

Add clarification on ordering of middleware if Route is used #578

Closed
@sjanuary

Description

@sjanuary

An issue was raised in express where a Route was created by calling router.route, then some middleware was added to the Router, then some method handlers were added to the Route. The user expected the middleware added to their Router to be called before the Route's method handlers, but in fact it was not because the Route had been created first and that controlled the precedence of it's handlers.

It might be good to add a short note to the router.route API docs to mention this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions