covidAPI
covidAPI copied to clipboard
countries sorted by cases for api get all countries
Hi! First of all thanks!
The problem I see here is, it is sorting every single time there is a request (300 requests/second are reaching the host at the moment). What if we do the sorting right before saving it to db? that we will already be sorted when fetching it and only happens once every 3 minutes...
Thats a good idea should be fine.
The web scraping part i don't know . You used cheerio manipulating the data? The table there is already sorted i think.
Seems like the only one out of place is china isnt it? maybe we should just investigate why
Yes can you sort before insert to db?
I think we should sort in the api get itself