Skip to content

API for fetching COVID 19 India cases data from official source Ministry of Health and Family Welfare mohfw.gov.in.

License

Notifications You must be signed in to change notification settings

crosslibs/covid19-india-api

Repository files navigation

API for COVID-19 India Data from official source, Ministry of Health and Family Welfare (mohfw.gov.in)

Build and Start the service

Run locally

Prerequisites

You need to have Node.js version 12.0 or later installed in your machine. Please follow setup instructions from https://nodejs.org/en/download/ if you do not have Node.js installed already.

# Install dependencies
npm install

# Run the HTTP server (starts the HTTP server on PORT 8080)
npm start

Run in Docker

# Build Docker image
docker build -t covid19-india-api:latest .
# Start container
docker run -p 8080:8080 -d covid19-india-api:latest

API Documentation

You can view the documentation at http://localhost:8080/v1/api-docs once the server is up and running.

Alternatively, you can also view the API documentation by clicking here.

Access the current COVID-19 cases in India and across the states from mohfw.gov.in through this API

HTTP GET http://localhost:8080/v1/data/current

Contact

For any queries, please reach out to me at [email protected] or post an issue in the repo.