vrvlive / news-api-client

Angular 10 client application for consuming news api from https://newsapi.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NewsApiClient

This is a simple Angular 10 application for displaying latest news, by calling news API provided by https://newsapi.org/.

Note

Register at https://newsapi.org/ and obtain an API key for running the application. API key is not given in this source code.

Warning

Do not use this code in production, without having a proxy of your own and having additional authentication, as your your API key can easily be retrieved by anyone from the browser.

Running the application

  • Get your API from https://newsapi.org/
  • Update environment variable apiKey: '<get_your_own_key>' in environment.ts file
  • run npm update
  • run ng serve -o to view the latest news served by the API.
  • Or run it with docker
    • docker build . -t news-reader-app
    • docker run -d -p 80:80 --rm --name news-site news-reader-app

Sample Screenshots

  • Large screen rendering

Large Screen

  • Small screen rendering and navigation

Small Screen Small Screen

About

Angular 10 client application for consuming news api from https://newsapi.org/

License:MIT License


Languages

Language:TypeScript 72.8%Language:HTML 11.6%Language:JavaScript 8.9%Language:CSS 6.6%