A progressive Node.js framework for building efficient and scalable server-side applications.
This project serves as an example for setting up a cursor based pagination pattern. The cursor is a JSON payload encoded in base64 that can be decoded by end clients. If a cursor is not present, the api will automatically generate a cursor and redirect the user to the start of the traversal path. From there each subsequent request for the resource collection will provide a corresponding cursor.
Cursor payload example:
{
"start": 0,
"count": 100,
"links": {
"next": "http://localhost:3000/api/v1/todo?cursor=eyJzdGFydCI6MTAwLCJjb3VudCI6MTAwLCJsaW5rcyI6eyJuZXh0IjpudWxsLCJwcmV2aW91cyI6bnVsbH19",
"previous": null
}
}
$ yarn install
# development
$ yarn run start
Nest is MIT licensed.