An Angular app that displays news articles from around the world in different categories from News API.
This project was generated with Angular CLI version 13.2.3.
- Live link: https://nbc-newz.herokuapp.com/
You will find below the different third party libraries used in the project.
| Feature | Package | Benefits |
|---|---|---|
| Angular | angular |
A platform and framework for building single-page client applications using HTML and TypeScript |
| Angular CLI | @angular/cli |
A command-line interface tool that you use to initialize, develop, scaffold, and maintain Angular applications directly from a command shell. |
| Angular Router | @angular/router |
Handles the navigation from one view to the next. |
| Angular-Font Awesome | angular-fontawesome |
Friction-less way to use our icons in your Angular applications |
| RxJS | rxjs |
JavaScript library that uses observables for reactive programming |
| Axios | axios |
Allows for communication with the APIs |
| NGX-oading-Bar | @ngx-loading-bar/http-client |
A fully automatic loading bar with zero configuration for Angular app (http, http-client and router). |
| PrimeNG | primeng |
A collection of rich UI components for Angular |
| News API | newsapi |
A simple, easy-to-use REST API that returns JSON search results for current and historic news articles |
| Express | express |
A minimal and flexible Node.js web application framework that provides a robust set of features for web and mobile applications. |
- The News API from newsapi forbids CORS request i.e the API does not accept request from a browser except from localhost. However, this can be solved by making the request on the server-side and forwarding the request to the front-end from your server.
- Clone project
git clone https://github.com/Adedeji-Taiwo/Nbc-News.git - Install dependencies using
npm install. - Generate API_KEY for the API endpoints by signing up at newsapi.
- Create
.envfile to store config variables such as API Key, port, and node. Add.envfile to gitignore before committing to keep keys and other information private. - Start backend server by running
node server.jsto start Express.
Run ng serve for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
