How best to organize the test array references using Node.JS?

There is a very large array of links leading to different pages of the same website. You need to check response code for each link, thus not overloading the server and is not caught in its filter.
If the response code is not 200, throw a message to the console.
August 23rd 19 at 10:35
1 answer
August 23rd 19 at 10:37
That would not overload the server, do the test consistently.
1) There is an array of
2) Run the test function
3) Function pulls the first element, sends a request
4) If the response is received (200/404, etc.) removes the first element of the array, outputs the code to the console
5) After that checks the quantity of the remaining elements, if > 0, runs itself through a setTimeout of 1000, otherwise it reports the completion of the work

Find more questions by tags Node.js