/API

API for Current cases and more stuff about COVID-19 or the Novel Coronavirus Strain

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

Logo

DockerHub Downloads GitHub contributors ESLint Tests GitHub top language GitHub issues GitHub closed issues GitHub pull requests GitHub closed pull requests

Join our Server!

Discord server

API

API for Current cases and more stuff about COVID-19 or the Novel Coronavirus Strain.

Check out our homepage and sign up for our newsletter here

Recommended by Postman

NovelCovid API is recommended by Postman here

Documentation

NovelCovid/API Documentation can be found here

Installation

Without Docker

Redis

  1. Download redis from https://redis.io/topics/quickstart
  2. Start redis server using redis-server

Project

  1. Fork and clone the git repository
  2. In the new folder you will find a example.env file, duplicate it and rename it to .env only.
  3. Change the env variables to fit your environment (leave them blank for default values)
  4. Run npm run start:dev
  5. Open your browser and navigate to localhost:{PORT} (PORT being the port specified in your .env file)
  6. You should now see the APIs landing page

With docker-compose

  1. Fork and clone the git repository
  2. In the new folder you will find a example.env file, duplicate it and rename it to .env only.
  3. Change the env variables to fit your environment (leave them blank for default values)
  4. Run npm run docker-start-dev

NPM Package

Version Size Downloads

We suggest you load the module via require, considering ES modules in Node.js are not yet stable.

Executing a method will return a Promise. The examples here utilise async/await to access the data.

JavaScript:

const { NovelCovid } = require('novelcovid');

TypeScript:

import { NovelCovid } from 'novelcovid';

Methods

Everything is listed on the npm site.

Note

Since data.updated returns milliseconds, you can do new Date(data.updated) as it returns an ISO Date

You can read more about new Date() here

For further support, you can join our discord server! More Tutorials can be found there too! https://discord.gg/QAY6rAz

Sources:

https://www.worldometers.info/coronavirus/

https://github.com/CSSEGISandData/COVID-19/tree/master/csse_covid_19_data/csse_covid_19_time_series

https://github.com/nytimes/covid-19-data

https://github.com/ActiveConclusion/COVID19_mobility

https://www.canada.ca/en/public-health/services/diseases/2019-novel-coronavirus-infection.html

https://github.com/pcm-dpc/COVID-19

Contributors ✨

Thanks goes to these wonderful people (emoji key):


EliteDaMyth

💻

Ethan Winters

🐛 💻

dicedtomato

💻

apollyon600

📖

James Shelley

👀

Ryan Harlow

🐛

Ali Tas

🐛

Walter Corrales

💻

Ahmad Awais ⚡️

📖

MrAugu

🐛

Ayyan Lewis

🐛

Ben Sommer

🐛 💻

Luis De Anda

📖

puf17640

🐛 💻

Oluka Denis

🐛

Showcases (Awesome-NovelCOVID)

Did you build a project with our API? We now offer an "awesome-list" for you to add your projects into so people can find out about them!

You can find it here.

Donating

Buy Me A Coffee

License

FOSSA Status