Prefer live timeseries.json

When I was first developing this, and I attempt to access
https://pomber.github.io/covid19/timeseries.json, the browser prevents me from
reading the data because it violates the same origin policy.

I'm learning more about CORS, and I'm going to try consuming this from...
https://wpcarro.dev -> https://pomber.github.io
...instead of...
http://localhost:8000 -> https://pomber.github.io
...because the http -> https protocol violates CORS.

I will not know unless I try, so... bombs away.
This commit is contained in:
William Carroll 2020-03-19 10:25:25 +00:00
parent abd2dcc6a3
commit c627fa9cbd

View file

@ -9,7 +9,7 @@
<script src="./node_modules/chart.js/dist/Chart.bundle.min.js"></script>
<script>
var timeseries =
fetch('./timeseries.json')
fetch('https://pomber.github.io/covid19/timeseries.json')
.then(res => res.json())
.then(createChart);