Skip to content

Instantly share code, notes, and snippets.

@takuoka
Created January 5, 2013 07:20
Show Gist options
  • Save takuoka/4460307 to your computer and use it in GitHub Desktop.
Save takuoka/4460307 to your computer and use it in GitHub Desktop.
Mongooseで、日付順で投稿を取り出す。(node.js) ref: http://qiita.com/items/9ecee35dad1c61bdf1ac
Post.find({}).sort('-created').execFind( function(err, items){
console.log( err );
res.render('index.jade', { title: title, posts: items });
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment