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:
		
							parent
							
								
									abd2dcc6a3
								
							
						
					
					
						commit
						c627fa9cbd
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -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); | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue