Skip to content

Instantly share code, notes, and snippets.

@pyrobot
Created May 17, 2013 23:58
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 pyrobot/5602685 to your computer and use it in GitHub Desktop.
Save pyrobot/5602685 to your computer and use it in GitHub Desktop.
"pseudocode" example
/*
app = express()
db = a mongodb with the collection "users"
*/
app.get('/user/:name', function (req, res) {
db.users.find({name: req.params.name}, function (theRecordThatYouAskedFor) {
res.render('mytemplatename', { myTemplateVariableThatHoldsUserInfo: theRecordThatYouAskedFor})
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment