Skip to content

Instantly share code, notes, and snippets.

@jashkenas
Forked from Scriptor/gist:337849
Created March 19, 2010 17:13
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 jashkenas/337851 to your computer and use it in GitHub Desktop.
Save jashkenas/337851 to your computer and use it in GitHub Desktop.
routes: {}
get: (route, handler) ->
routes[route]: handler
#############################################
get 'greet/:name', (request) ->
"Hello " + request.params['name']
# becomes
routes = {
'greet/:name': function(request){
return "Hello " + request.params['name'];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment