Skip to content

Instantly share code, notes, and snippets.

@brayoh
Created May 3, 2016 05:06
Show Gist options
  • Select an option

  • Save brayoh/95e7b409caeb5d4f807e25ec0ee64fc1 to your computer and use it in GitHub Desktop.

Select an option

Save brayoh/95e7b409caeb5d4f807e25ec0ee64fc1 to your computer and use it in GitHub Desktop.
mongoose node .js query pagination
#how to paginate results in mongoose queries
MyModel.find(query, fields, { skip: 10, limit: 5 }, function(err, results) { ... });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment