Skip to content

Instantly share code, notes, and snippets.

@hojberg
Created June 1, 2010 08:56
Show Gist options
  • Save hojberg/420739 to your computer and use it in GitHub Desktop.
Save hojberg/420739 to your computer and use it in GitHub Desktop.
var app = wrench.appify({
init: function () {
// this will run after in the boot up process initiated by app.run();
},
users: {
list: route("users/list/").to(function () {
// fetch all the users and show them on the page
}),
show: route("users/show/:id").to(function (params) {
// find the user via params['id']
})
}
});
app.run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment