Coder Social home page Coder Social logo

covid-school-growth-api's Introduction

Client

There is an Angular SPA client you can use with this API!

covid-school-growth-api

API to build and get data about COVID in a custome format

ENV variables

  • DB_URI=your_MongoDB_connection_string
  • PORT=your_API_server_port
  • NODE_ENV=production (prod mode)

Routes:

POST /datamutate/createDBmodel

  • this route builds the database, from 2020. Sept. 01. to the current date with Date.now()
  • confirmation header MUST BE included with the value: true or allow, eg.: 'confirmation': 'true' or 'confirmation': 'allow'
    (this is checked by the allowRebuild middleware)

POST /datamutate/addLatestStatus

  • this will create the latest status update in MongoDB (daily updates)
  • 2 conditions have to be met: it doesn't exist already and the new update is avaliable
  • this route needs to be automated! For example with a cronjob:
    • 1 8 * * * /usr/bin/curl --silent -X POST https://your-api-domain.com/datamutate/addLatestStatus >/dev/null 2>&1

PUT /datamutate/updateLatestStatus

  • this will update the latest status update in MongoDB if the COVID API has a newer status
  • client has a functionality to access this route
  • this route needs to be automated! For example with a cronjob:
    • 1 19 * * * /usr/bin/curl --silent -X PUT https://your-api-domain.com/datamutate/updateLatestStatus >/dev/null 2>&1

GET /clientdata/getAllStatuses

  • gets an array of every avaliable statuses found in MongoDB

GET /clientdata/getDailyCases

  • gets the number of new cases for each day

covid-school-growth-api's People

Contributors

anymus0 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.