Created
January 5, 2013 07:20
-
-
Save takuoka/4460307 to your computer and use it in GitHub Desktop.
Mongooseで、日付順で投稿を取り出す。(node.js) ref: http://qiita.com/items/9ecee35dad1c61bdf1ac
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
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