Created
June 4, 2013 17:20
-
-
Save Polyrhythm/5707783 to your computer and use it in GitHub Desktop.
Express/backbone routing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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