Skip to content
js
;(async () => {
  try {
    // limit skip sort count
    const limit = 2 // 每页 2 条
    const currentPage = 2 // 当前页
    const res = await Student.find({}).limit(limit).skip((currentPage - 1) * limit)
  } catch (error) {
    console.log(error)
  }  

  conn.close()
})()