- Initialize project.
- Updated:
- Updated:
- The last web pag has been replaced for a new one.
- Now, a response is sended as follows (in case of success):
In case of error:
{ "success": true, "error": false, "message": { "cities": [ { "name": "city_name", "cases": 100, "deaths": 20 } ] } }
{ "success": "false", "error": "true", "message": "Error while loading the data" }
- Three functions has been added in order to clean the data and send it to the frontend.
- The command to run the server has changed from
yarn start
toyarn service
.
- Updated:
- There wasn't necessary to scrape this page, now the information has been gotten from this API.
puppeteer
is not used anymore, insteadaxios
is used to perform a aGET
request to the API mentioned before.- Finally, there was a little modification to the response, in case of success:
{ "success": true, "error": false, "message": { "departments": [ { "name": "department_name", "cases": 100, "deaths": 20 } ], "totalData": { "totalCases": 174, "totalDiscarded": 169, "totalRecovered": 91, "totalDeaths": 7 } } }
- Updated:
- All the data from de Covid 19 in Peru was stored in the database of the project.
- A
get
andpost
for the/covid/peru/
endpoint was implemented.- The
post
method is used to get the data from the API and then store it to the database. - The
get
method is used to get date-specific data depending of date, so it must be called as/covid/peru/:date
.
- The
- Changed location of
gitignore
file.
- Updated:
- Allow request from everywhere.
- Added:
- Frontend branch.
- Created React App with
create-react-app
. axios
was added in order to makehttp
requests to the backend endpoints.material-ui
was added in order to stylize the app components.mapbox-gl
was added in order to implement a Peru map using a geojson file.chart.js
was added in order to make statistic charts using Peru data that reports Covid-19 cases.
- Created React App with
- Frontend branch.
- Updated:
- Minor changes.
- HotFix:
- 'Access-Control-Allow-Headers' repaired.
- HotFix:
- Date repaired.
- Updated:
- Implemented endpoint
/api/covid/peru/currentDate
. It returns the last date in the database.
- Implemented endpoint
- Updated:
- New endpoint that provides the total data per department by day, and the Peru total data per day.
- Updated:
- Homogenization of the data.
- Rebuild of the routes, now
controllers
are been used inside thesrc
folder. - New rules added to the
.eslintrc.js
file.
- Updated:
- Fixed:
- Time to update the database.
- Fixed:
- Time to update the database.
- Fixed function to update the database.
- Fixed:
- Time to update the database by the crontab.
- Updated:
- Implemented
nodemailer
in order to send a confirmation email when the database was updated, or an error email when the database couldn't be updated.
- Implemented
- Fixed:
- The data from
totalData
endpoint now returns the data sorted ascending. - There is a
console.log
when an email is sended.
- The data from
- Fixed:
- Date when the mail is sended.
- Implemented:
- A rule to avoid
var
.
- A rule to avoid
- Fixed:
- Date to be saved in the database now has hours, minutes, seconds and milliseconds are set to 0.
- Implemented:
- New rules to order the keys of an object.
- Fixed:
- Hour to the update the database from
Heroku
.
- Hour to the update the database from
- Implemented:
- Location from where that database was updated, Anthony's laptop or Heroku.
- Capital letter for environment variables.
- Fixed:
dateGenerator
method.
- Fixed:
- Error message that is sended by email.
- Full refactorization of the code.
- Implemented:
- Updated to
ES6
. babel
is a dev dependence.lib
folder now contains the project ready to be deployed in production.- New rule to single quotes.
- All the project is inside
src
folder.
- Updated to
- Implemented:
home
route.
- Implemented:
- Covid controller is now a function called
databaseUpdater
. - Refactorization of some code.
- Creating ad
Dockerfile
to change the way to deploy. - New
lib
folder ready to deploy.
- Covid controller is now a function called
- Fixed:
- The request to get all the data now it's done using PERÚ rather than peru.
- Fixed:
- The request to get all the data now it's done using perú rather than PERÚ.
- Fixed:
Dockerfile
not longer installsyarn
globally.
- Fixed:
- Updating
lib
folder.
- Updating
- Fixed:
Dockerfile
.
- Fixed:
Dockerfile
.
- Fixed:
Dockerfile
.
- Fixed:
- Now the request must be using the correct spelling of each peruvian department.
- Fixed:
- Updating
lib
folder.
- Updating
- Implement:
readme.md
file with the documentation.
- Implemented:
puppeteer
in order to implement our scrapper.ocr-space-api-alt2
in order to make a request to ORC.SPACE API to get text from an image.- An scrapper that will be used in case the first API is not updated. This scrapper will try to get information from the situational room. Checkout
dataBaseUpdater
function. imgToText
function, to get the embedded text from the screen shot that the scrapper performs.cleanerForScraper
function, to clean the data gotten from the situational room. .cleanerForTNumbers
function, to clean the data gotten from theìmgToText
function.- New rule to ignore comments length.
- Updated:
src/bin/index.js
file, cleaning some useless code.src/app.js
file, cleaning some useless code.dateGenerator
function, to avoid time zone.dataPerDat
controller now implementsdateGenerator
function.- Documentation.
- Removed:
- The scrapper (and the dependencies need it to do this) because the data from the situational room incomplete.
- Implemented:
src/routes/routes.js
file, in order to apply the routes to the server.dataInEachDay
endpoint, to get the daily data.fromAccumulateToDaily
function, to clean the accumulate data and present it as daily.process.on
function, in thebin/index.js
file, in order to handle the unhandled rejection of promises, if there were some.
- Updated:
.eslintrc.js
file, added some new rules, to avoid unnecessary parenthesis, and to prefer constants.setInterval
function, to repeat the request to the API in case it fails every 28 minutes.
- Implemented:
set-immediate-interval
library, in order to execute the first request to the API without delay.
- Fixed:
- The
setInterval
function, now it is executed without delay.
- The
- Updated:
- Fixed:
- Some minor bugs in the
dataBaseUpdater
file that provoked the send of many emails without control.
- Some minor bugs in the
- Fixed:
- Some minor bugs in the
dataBaseUpdater
file that provoked the send of emails without content.
- Some minor bugs in the
- Updated:
- HOME environment variable has changed to HOME_URL.
- Route
/
now displays the current date in the server.
- TODO:
- Remove currentDate route in favor of the home content.
- Fixed:
- Message of route
/
.
- Message of route
- TODO:
- Remove currentDate route in favor of the home content.
- Removed:
currentDate
route.
- Updated:
- Deprecated:
- Cron job to update the database.
- Updated:
- Dependencies.
- Updated:
- Dependencies.
- Updated:
- Dependencies.