This is NodeJS project using mysql for the database and Prisma As the ORM
-
https://localhost:5000/api/get/home: Starts Scraping the Home page of thehttps://downdetector.com/to get thepage_link, company_name, logo_src and latest statisticsand return a json array list containg all the data in objects ex:[ { "logo_src": "https://cdn2.downdetector.com/static/uploads/c/x40/697d6/download-2_WrQ5dDC.png", "company_name": "000webhost", "page_link": "https://downdetector.com/status/000webhost/", "index": 0, "statistics": { "label": "reports", "data": [ { "x": "2021-11-12T23:07:06+00:00", "y": 0 } ] } } ] -
https://localhost:5000/api/get/report/{serviceid}: The serviceId is equal to theindexobject which is uniques, thus we can go to that specifc page_link of that serviceId provided get the latest update of thelatest statisticsthen update that specic objects statistics according to the serviceId and return the new object