fullstack-demo icon indicating copy to clipboard operation
fullstack-demo copied to clipboard

What does this route do

Open davisford opened this issue 9 years ago • 0 comments

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?

davisford avatar Oct 22 '14 19:10 davisford