Skip to content

Latest commit

 

History

History
58 lines (46 loc) · 1.46 KB

README.md

File metadata and controls

58 lines (46 loc) · 1.46 KB

livecod-backend

The backend server that powers livecod.

livecod의 백앤드 서버입니다.

Getting Started

Installation

  • Node.js v10+
git clone https://github.com/LiveCoronaDetector/livecod-backend.git
cd livecod-backend
npm install

Starting the development server

npm run dev

Documentation

API version 1 Prefix all requests with /v1/.

Fetching data

GET /v1/covid-19/:countryCode/:subdivisionCode?

Params

Param Explanation
countryCode ISO 3166-1 alpha 2 country code (2자리 국가 코드)
subdivisionCode? Optional ISO 3166-2 subdivision code (영토 구성 단위(시/군/구) 코드)

Creating data

POST /v1/covid-19/:countryCode/:subdivisionCode?

Params

Param Explanation
countryCode ISO 3166-1 alpha 2 country code (2자리 국가 코드)
subdivisionCode? Optional ISO 3166-2 subdivision code (영토 구성 단위(도) 코드)

Header

Authorization: Bearer <apiKey>
Content-Type: application/x-www-form-urlencoded

Body

infectedCases: req.body.infectedCases,
deadCases: req.body.deadCases,
recoveredCases: req.body.recoveredCases,
timestamp: req.body.timestamp

License

MIT