Real time covid-19 tracker api using node js & express js. below plugin are used to implement API:

cors, csv-parser, express, mongodb, node-cron,  request

CORS used for allow Access-Control-Allow-Origin for that need to use middleware : app.use(cors()).

csv-parser can convert CSV into JSON at at rate of around 90,000 rows per second.Example :

fs.createReadStream('filepath')  .pipe(csv())  .on('data', (data) => results.push(data))  .on('end', () => {    console.log(results);     });

The node-cron module is tiny task scheduler in pure JavaScript for node.js based on GNU crontab. This module allows you to schedule task in node.js using full crontab syntax. Syntax :

cron.schedule('* * * * *', () => {  console.log('running a task every minute');});

Request is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default. Syntax:

request('http://www.google.com', function (error, response, body) {  console.error('error:', error); // Print the error if one occurred  console.log('statusCode:', response && response.statusCode); // Print the response status code if a response was received  console.log('body:', body); // Print the HTML for the Google homepage.});
procedure to run COVID-19 API :
  1. clone from git link : git clone https://github.com/tapanspectrum/covid19.git
  2. cd covid19
  3. npm install
  4. npm start