Skip to content

Instantly share code, notes, and snippets.

@tim-smart
Created February 3, 2010 05:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tim-smart/293347 to your computer and use it in GitHub Desktop.
Save tim-smart/293347 to your computer and use it in GitHub Desktop.
// Automatic parse querystrings. If "^/home" is specified,
// it will also check for "^/home?somedata=test"
Get(["^/(home)(.*)", "^/(news)(.*)"], function(details, regexMatch) {
details.params["help"];
...
}
Post(..., function(details, regexMatch) {
details.params["username"];
...
});
Stream(["^/stream/?(.*)"], function(...) { ... });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment