8000 GitHub - ryanda/dekontaminasi: DIY static API server for COVID-19 data in Indonesia
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

DIY static API server for COVID-19 data in Indonesia

License

Notifications You must be signed in to change notification settings

ryanda/dekontaminasi

 
 

Folders and files

8000
NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dekontaminasi

GitHub license GitHub code size in bytes Tests

Bahasa Indonesia | English


Bahasa Indonesia

Repositori ini menyimpan perkakas yang digunakan untuk membuat dekontaminasi.com, sebuah layanan API untuk data perkembangan COVID-19 di Indonesia.

Dengan mengubah isi repositori sesuai kebutuhan, Anda pun bisa menjalankan layanan API Anda sendiri untuk menyebarluaskan informasi COVID-19!

Beberapa ragam data yang tersedia (dalam format JSON):

CATATAN: Data paparan COVID-19 diekstrak dari dashboard resmi ArcGIS milik BNPB (Badan Nasional Penanggulangan Bencana).

Yang diperlukan (versi minimum): Node.js versi 10, curl versi 7.58, jq versi 1.5. Pengguna Ubuntu/Debian bisa mendapatkannya dengan:

sudo apt install -y nodejs curl jq

Cara menjalankan:

npm install
npm run build

maka data-data penting akan diletakkan di direktori public:

$ find public/ -type f
public/api/id/covid19/hoaxes
public/api/id/covid19/hospitals
public/api/id/covid19/news
public/api/id/covid19/stats
public/index.html
public/ping

yang tentunya telah siap dipublikasikan sebagai situs statik, misalnya menggunakan Firebase Hosting, Zeit/Vercel, Surge, Netlify, Aerobatic, dan yang sejenisnya, ataupun juga diletakkan di sebuah server HTTP secara manual.

Khusus untuk dekontaminasi.com, data-data tersebut akan diperbarui tiap 15 menit karena tahapan npm run build terus dipicu secara berkala, memanfaatkan fitur scheduled event dari GitHub Actions (lihat dokumentasinya).


English

This repository contains the tools necessary to build dekontaminasi.com, an API service to get the latest COVID-19 development in Indonesia.

If you want to run your own COVID-19 API server, simply customize and tweak this repository and deploy the data accordingly!

Currently, some available information includes (formatted as JSON):

NOTE: The information on COVID-19 spread is extracted from the official ArcGIS dashboard of BNPB (National Disaster Mitigation Agency).

Minimum requirements: Node.js version 10, curl version 7.58, jq version 1.5. For Ubuntu/Debian, fulfill these by installing the following packages:

sudo apt install -y nodejs curl jq

To run the data extraction:

npm install
npm run build

which will place the important bits in the public subdirectory:

$ find public/ -type f
public/api/id/covid19/hoaxes
public/api/id/covid19/hospitals
public/api/id/covid19/news
public/api/id/covid19/stats
public/index.html
public/ping

that can be published just like a regular static site, e.g. using Firebase Hosting, Zeit/Vercel, Surge, Netlify, Aerobatic, etc, or served manually from any HTTP server.

Note that for dekontaminasi.com, the data will be updated every 15 minutes because npm run build is triggered periodically, thanks to the scheduled event feature from GitHub Actions (check the documentation).

About

DIY static API server for COVID-19 data in Indonesia

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 94.8%
  • JSONiq 3.8%
  • HTML 1.4%
0