Skip to content

Instantly share code, notes, and snippets.

@KarlHerler
Created July 6, 2011 05:22
Show Gist options
  • Save KarlHerler/1066621 to your computer and use it in GitHub Desktop.
Save KarlHerler/1066621 to your computer and use it in GitHub Desktop.
A express route
app.get('/:user/:tag', work.loadData, function(req, res) {
var uname = (req.session) ? (req.session.user===undefined) ? "" : req.session.user.name : "";
res.render('index', {
title: req.params.tag,
page: "index",
data: req.workDatas,
username: uname,
tracking: true
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment