This is a Flask application that helps users list and preview news articles from various sources.
- A few details about this project:
- Python3
- Flask version 2
- HTML, CSS and JavaScript
- News API
- C
- Shell
- IDE of Choice
- Python3
- Browser
- Please ensure you're working from a Windows/MacOS/Linux
- Install Flask through
pip flask install
- Proceed to this link and clone the repository.
- Extract the folder and
cd
to the folder on your terminal or your prefered IDE - In the terminal, create a virtual/flask environment:
python3 -m venv virtual
and activate it throughsource virtual/bin/activate
. In the case of flask, please usesource flask/bin/activate
. - Install all dependencies from the
requirements.txt
file; usepip
to install needed dependencies. - In the project folder, create a
start.sh
file which acts as a server at runtime. - In the terminal, and within the project folder, run
chmod +x start.sh
and./start.sh
to start the project. - View the application on your browser on
http://127.0.0.1:5000
. If you have another project running on another port, useflask run --host 0.0.0.0 --port 5001
to switch to a new port; You can use a different port number.
The BDD focuses on how a user interacts with the application.
At a minimum, this is what the user should experience in the application:
- Main landing page with a list of articles from different authors and sources.
- By using the navbar, the user can navigate to different articles from different domains such as health or business.
- By using the search from on the navbar, the user can search for their favorite article.
- If a user clicks on a particular article link, they are redirected to the article's page where they can read it.
- Navigating to a different news section such as
Kenya
allows a user to read articles from that particular country.
To contribute to this project, please follow the following steps:
- Fork this repository.
- Create a branch:
git checkout -b <branch_name>
. - Make your changes and commit them:
git commit -m '<commit_message>'
- Push to the original branch:
git push origin <flask-news>/<main>
- Create the pull request and wait for a PR review
Please see the GitHub documentation on Creating a Pull Request
To improve this project or fix a bug, please reach me via Email:
Alternatively, you can contact me via LinkedIn
Please view the project LICENSE for more information.