1Post.find({}).sort('test').exec(function(err, docs) { ... });
2Post.find({}).sort([['date', -1]]).exec(function(err, docs) { ... });
3Post.find({}).sort({test: 1}).exec(function(err, docs) { ... });
4Post.find({}, null, {sort: {date: 1}}, function(err, docs) { ... });
1Blah.find({}).sort({date: -1}).execFind(function(err,docs){
2//code
3});
4
5-1 for descending & 1 for ascending
6
1// sort by "field" ascending and "test" descending
2query.sort({ field: 'asc', test: -1 });
3
4// equivalent
5query.sort('field -test');