Найдите все меньше, чем в MongoDB


exports.test  = async (req, res, next)=>{
    /*date: {
          $gte:ISODate("2013-11-19T14:00:00Z"),
          $lt: ISODate("2013-11-19T20:00:00Z")
      }
 */

let today = new Date();
 
    let all_users = await User.find({created_at: {$lte: today}}).sort({_id:-1}).countDocuments();
res.render("test1", {docs: all_users});
Javasper