Skip to content

Instantly share code, notes, and snippets.

@clay-whitley
Created June 16, 2013 03:18
Show Gist options
  • Select an option

  • Save clay-whitley/5790628 to your computer and use it in GitHub Desktop.

Select an option

Save clay-whitley/5790628 to your computer and use it in GitHub Desktop.
Post.find({})
.sort('-date')
.exec(function(err, docs){
console.log(req.session);
Category.$where('this.name.length > 0;')
.exec(function(err, cats){
Page.find({nav: "true"}, function(err,pages){
res.render('index', {title: 'Clay Whitley | Blog', docs: docs, cats: cats, pages: pages, loggedin: req.session.loggedIn});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment