Skip to content

Commit

Permalink
Fixing #4, updating the README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulKinlan committed May 18, 2011
1 parent 65a43b2 commit 5e89071
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions README → README.md
@@ -1,3 +1,6 @@
LeviRoutes
==========

A simple lightweight routes framework for hooking in to HTML5 history. Currently when the system pop's state the route is triggered if matched.

var app = new routes();
Expand All @@ -15,3 +18,9 @@ It also named parameters for route syntax
app.get("/:category.:format", function(req) {
alert("format: " + req.params.format);
});

LeviRoutes can also intercept POST requests via forms, the framework will intercept all submits, and naturally let through requests that don't match the path, whilst firing your callback if there is a mathc

app.post("/:category", function(req) {
alert("posting form: In Category ", req.params.category);
});

0 comments on commit 5e89071

Please sign in to comment.