Currently, the endpoint for retrieving all messages returns all message documents from mongoDB as is.
This is certainly will affect the load time. In order to fix this, we'll implement pagination in that endpoint.
For starting point, you can search for pagination in mongoose because we use mongoose as ODM for the MongoDB
Route for the endpoint is GET /message, you can find it in route.ts
Currently, the endpoint for retrieving all messages returns all message documents from mongoDB as is.
This is certainly will affect the load time. In order to fix this, we'll implement pagination in that endpoint.
For starting point, you can search for pagination in mongoose because we use mongoose as ODM for the MongoDB Route for the endpoint is
GET /message
, you can find it inroute.ts