A fun little app built in Svelte! See the latest UK news, and search by keyword. Click on any article to see more details, like a pretty image 🌈, a snippet, and a link to the source.
git clone [email protected]:jtrein/svelte-news.git
cd svelte-news/server
npm i
cd ../
npm i
npm start
svelte, svelte-routingnode, expresstesting-library/svelte, jestnpm test
The app is divided into components, but the workhorse is NewsList.svelte. I chose Svelte because I wanted to learn it. Svelte has taken a bit more time to get right in the sense that I needed to unlearn React habits, but it is an absolute joy to code in. I will be reaching for it in the future.
/top-headlines endpoint (I attemped to use /everything but the country source wasn't allowed).Enter key. Article could most likely utilise props being passed in, instead of using the store, but I had some fun playing with the store.server could add headers and more precise error handling (e.g. responding to rate limiting on News API).