Team member: Duo Xu(dx9), Danfeng Yang(dy33), Siqing Zheng(sz70), Jing Gao(jg107), Kaiven Deng(kd45)
The function of this Repository is taking the data that analyzed by Data Processing Team, and provide a serious APIs for front-end team to get data based on different functions requirement. For example, get vaccine data, conform data based on state, county, etc.
This back-end project deployed on Heroku with Node.js Runtime. The base Url is: https://guarded-peak-91121.herokuapp.com
You are free to deploy by yourself.
Here is how to Do it.
git add .
git commit -m ‘first commit
heroku login
The login page will pop out.heroku create
Create your application instance.git push heroku main
Run it on your local machine
-
npm init
-
npm start
Get local url from terminal and test it
Read api.md to see the REST API to the example app.
- Util Folder
- Implemented the function that fetches CSV data from data process team and transform to json file asynchronously. Handles errors, like it should have message out when fetching invalid url.
- fetchData.js
- Here include function for comfirmed cases
- fetchVacine.js
- Here include functions for vaccine data
- Index.js
- This file is where we produce the APIs, which utilizes express.js framework to create API Urls.
- Heroku: deploy online platform
- express: api framework
- Dependencies
- axios
- body-parser
- cookie-parser
- csv-parser
- csvtojson
- fast-csv
- got