COVID-19-REPORT-API is an API Service to keep tracking COVID-19 cases worldwide
# clone the repo
$ git clone https://github.com/AlaeddineMessadi/COVID-19-REPORT-API.git
# install dependencies
$ yarn ## or npm install
# run in development mode
$ yarn dev ## npm run dev
# run tests
$ yarn test ## npm run test
Runs the application is development mode. Should not be used in production
$ yarn dev
## or with debug
$ yarn dev:debug
Compiles the application and starts it in production production mode.
$yarn compile
$ yarn start
# Get me a brief report
[GET] /api/v1/cases/brief
# Get me a brief timeseries
[GET] /api/v1/cases/brief/timeseries
# Get me all latest cases in the world or in specific region or country
[GET] /api/v1/cases/latest # parameters {iso: String, province: String, onlyCountries: Boolean}
#! iso parameter can be iso2 or iso3 for example: US or USA , CN or CHN
examples:
[GET] /api/v1/cases/latest
[GET] /api/v1/cases/latest?onlyCounties=true
[GET] /api/v1/cases/latest?iso=US
[GET] /api/v1/cases/latest?iso=US&onlyCounties=true
[GET] /api/v1/cases/latest?onlyCounties=true
[GET] /api/v1/cases/latest?iso=AU&province=New+South+Wales
[GET] /api/v1/cases/latest?province=New+South+Wales
# Get me all timeseries in the world or in specific region or country
[GET] /api/v1/cases/timeseries # parameters {iso: String, province: String, onlyCountries: Boolean}
examples:
[GET] /api/v1/cases/timeseries
[GET] /api/v1/cases/timeseries?onlyCounties=false
[GET] /api/v1/cases/timeseries?iso=DE
[GET] /api/v1/cases/timeseries?iso=AU&province=New+South+Wales
[GET] /api/v1/cases/timeseries?province=New+South+Wales
[GET] /api/v1/cases/timeseries?iso=CH&onlyCounties=true
# Secret me list of contries/regions with iso2 and iso3
[GET] /api/v1/cases/countries
# Secret endpoint to update Database
[GET] /api/v1/cases/udpate?secret=secret
#! change your secret in the .env file
# Get ALL
[GET] /api/v1/cases
#! response will be huge!!
Run the Mocha unit tests **TO DO: ** more tests to implement
$ yarn test
## or
$ yarn test:debug
- Open you're browser to http://localhost:3000
- Invoke the
/cases
endpointcurl http://localhost:3000/api/v1/cases/brief
Fix all prettier linter errors
$ yarn lint
$ now
data repository for the 2019 Novel Coronavirus Visual Dashboard operated by the Johns Hopkins University Center for Systems Science and Engineering (JHU CSSE)