affinitybridge / unhcr

Map of services for Syrian refugees in Jordan
MIT License
5 stars 23 forks source link

Cache all services #6

Open Edouard-Legoupil opened 10 years ago

Edouard-Legoupil commented 10 years ago

A way to get the application offline could be to have a script that would rebuild the app everyday allowing to cache the various geojson webservices (https://github.com/ZoeAffinity/unhcr/blob/master/src/sources.txt) directly within the app.

ZoeAffinity commented 10 years ago

We now have a script that compiles the JSON; all that remains is to cron it.

Edouard-Legoupil commented 10 years ago

For the record

https://github.com/affinitybridge/unhcr/blob/master/src/getJSON.js

// This script expects a plaintext file of URLs, one per line, that resolve to valid geoJSON. // The input file will usually be sources.txt; the output file is always compiled.json. // To run this from the command line, go: // cat sources.txt | ./getJSON.js