Skip to content

What does this route do #14

@davisford

Description

@davisford

this line

  app.route('/:url(api|auth|components|app|bower_components|assets)/*')
   .get(errors[404]);

...looking for a quick explanation. I understand it is meant to redirect to 404 if the url doesn't match some specific paths, but the syntax is confusing.

Particularly '/:url( ... )/* -- what is :url( )? It does not seem to be part of express, nor any standard regex syntax. I get that in the parens it is using the logical or |, but I still don't get :url, is that actually embedded in the path?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions