Ángel Cereijo
1 min readJun 18, 2019

--

Hi,

There are several things here:

1 — maybe you should increase the timeout response from the clien call

2 — you should implement a paginate system (it is easy with “limit” and “skip” for mongo and an simple param in the request)

3 — maybe you can read the data with a buffer(like in the example in this article), build the array with the data and then send the response.

I recommend you to start with the second tip, it’s a good practice to paginate elements.

If you control the client too, you can implement the first tip.

And finally , try the third tip

--

--

Ángel Cereijo
Ángel Cereijo

Written by Ángel Cereijo

Software engineer with 15 year of experience. Lately focused in Node.js ecosystem and good practices.

Responses (1)