Online demo can be found on https://marcushellberg.github.io/alternative-news
Serve folder with your server of choice. For instance npm install -g serve
.
Online demo can be found on https://marcushellberg.github.io/alternative-news
Serve folder with your server of choice. For instance npm install -g serve
.
I thought this lesson would be great for a low level intro into PWAs. However, as others have discovered, the updateNewsSources code does not generate anything - the select remains empty. What I can't get is why the updateNews section works but the above does not - even though they are of substantially the same structure. On the YouTube video it does apparently work. Unfortunately, I can't replicate that. Has anyone actually changed the code to make the 'sources' dropdown work?
I tried opening up your site
https://marcushellberg.github.io/alternative-news/
It seems your news key was invalidated.
https://newsapi.org/v2/sources?apiKey=6f4fa5447bb24a2687edecc4c1df43b4
Uncaught (in promise) TypeError: Failed to fetch. When cache.Addall(staticAssets);
https://marcushellberg.github.io/alternative-news/
online demo does not seem to work, sources empty and no content? idk
Uncaught (in promise) TypeError: Cannot read property 'map' of undefined at updateNewsSources (app.js:28)
GET https://newsapi.org/v2/sources?apiKey=6f4fa5447bb24a2687edecc4c1df43b4 401 (Unauthorized) updateNewsSources @ app.js:24 window.addEventListener.e @ app.js:15 marcushellberg.github.io/:1 Failed to load https://newsapi.org/v2/sources?apiKey=6f4fa5447bb24a2687edecc4c1df43b4: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://marcushellberg.github.io' is therefore not allowed access. The response had HTTP status code 401. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled. marcushellberg.github.io/:1 Uncaught (in promise) TypeError: Failed to fetch Promise.then (async) window.addEventListener.e @ app.js:15
thanks
Hi,
I cloned the repo after watching your YouTube video about PWA.
It doesn't work on localhost and just gives a "No 'Access-Control-Allow-Origin' header is present on the requested resource" error.
It was a great video. Thanks for that. :D
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.