Permalink
Browse files

nutshell'd the readme

  • Loading branch information...
1 parent c4620f5 commit 2ee6f560aef821458e29f860b4299645bc0c1803 @kieran committed Jul 7, 2011
Showing with 22 additions and 0 deletions.
  1. +22 −0 Readme.md
View
@@ -1,5 +1,27 @@
Barista is a simple URL router for NodeJS.
+
+In a nutshell
+=============
+
+```javascript
+router.get( '/:beverage/near/:location(.:format)' )
+ .to( 'beverage.byLocation' )
+
+router.first( '/coffee/near/90210', 'GET' )
+// -> { controller:'beverage', action:'byLocation', beverage:'coffee', location:90210 }
+
+router.url({
+ controller: 'beverage',
+ action: 'byLocation',
+ beverage: 'coffee',
+ location: 90210,
+ format: 'json'
+})
+// -> '/coffee/near/90210.json'
+```
+
+
Getting Barista
===============

0 comments on commit 2ee6f56

Please sign in to comment.