You could use an axios request to each site, check the status code of the response, and then add the website/status code pair to an object.
const serversRunning = {};
for (let server of serverList){
const response = await axios({
url: `{url goes here}`,
method: "GET"
});
serversRunning[server] = response.status;
}
If response code is '200' it's running. I mean, it also depends on what you want to do with that information, but I feel like that would be the easiest that I know of.
or if you just want a list of running servers, change it to:
const serversRunning = [];
for (let server of serverList){
const response = await axios({
url: `{url goes here}`,
method: "GET"
});
if (response.status == '200'){
serversRunning.push(server);
};
}