Skip to content

Instantly share code, notes, and snippets.

@Polyrhythm
Created June 4, 2013 17:20
Show Gist options
  • Save Polyrhythm/5707783 to your computer and use it in GitHub Desktop.
Save Polyrhythm/5707783 to your computer and use it in GitHub Desktop.
Express/backbone routing
module.exports = (app) ->
# request specific user
app.get '/users/:user', (req, res) ->
console.log req.params.user
# catch-all for allowing Backbone to handle routing
app.get '*', (req, res) ->
res.render 'app/index'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment