There is an Angular SPA client you can use with this API!
API to build and get data about COVID in a custome format
- DB_URI=your_MongoDB_connection_string
- PORT=your_API_server_port
- NODE_ENV=production (prod mode)
- this route builds the database, from 2020. Sept. 01. to the current date with
Date.now()
- confirmation header MUST BE included with the value: true or allow, eg.:
'confirmation': 'true'
or'confirmation': 'allow'
(this is checked by the allowRebuild middleware)
- this will create the latest status update in MongoDB (daily updates)
- 2 conditions have to be met: it doesn't exist already and the new update is avaliable
- this route needs to be automated! For example with a cronjob:
1 8 * * * /usr/bin/curl --silent -X POST https://your-api-domain.com/datamutate/addLatestStatus >/dev/null 2>&1
- this will update the latest status update in MongoDB if the COVID API has a newer status
- client has a functionality to access this route
- this route needs to be automated! For example with a cronjob:
1 19 * * * /usr/bin/curl --silent -X PUT https://your-api-domain.com/datamutate/updateLatestStatus >/dev/null 2>&1
- gets an array of every avaliable statuses found in MongoDB
- gets the number of new cases for each day