Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

added globs to readme, version bump

  • Loading branch information...
commit a87cf5e5e70c10aa65508428c2487239e5be5585 1 parent f2815b8
@kieran authored
Showing with 19 additions and 1 deletion.
  1. +18 −0 Readme.md
  2. +1 −1  package.json
View
18 Readme.md
@@ -63,6 +63,24 @@ router.match( '/products/:id(.:format)', 'GET' )
.to( 'products.show' )
```
+### Globs (they also capture slashes)
+
+```javascript
+router.match( '/*path', 'GET' )
+ .to( 'errors.notFound' )
+
+router.first( '/somewhere/that/four-oh-fours', 'GET' )
+// -> { controller:'errors', action:'notFound', path:'somewhere/that/four-oh-fours' }
+
+
+router.match( '/*path(.:format)', 'GET' )
+ .to( 'errors.notFound' )
+
+router.first( '/somewhere/that/four-oh-fours.json', 'GET' )
+// -> { controller:'errors', action:'notFound', path:'somewhere/that/four-oh-fours', format:'json' }
+
+```
+
### Match conditions
```javascript
View
2  package.json
@@ -1,7 +1,7 @@
{
"name": "barista",
"description": "URL router & generator, similar to Rails / merb",
- "version": "0.0.4",
+ "version": "0.0.5",
"author": "Kieran Huggins <kieran@kieran.ca>",
"repository": "git://github.com/kieran/barista",
"main": "./index.js",
Please sign in to comment.
Something went wrong with that request. Please try again.