Yesterday I open-sourced a new npm module that I was using on Parkuik to perform pagination. It’s based on https://github.com/edwardhotchkiss/mongoose-paginate (Thanks!)
An example extracted from Parkuik (www.parkuik.com) source code:
The structure for the response (for example, if you want to use res.json()):
I’ll try to document more and more, but for now it’s enough.