This is a simple "Hello World" frontend application written in Python using Flask. It retrieves a message from a Golang API and displays it in a web browser using Bootstrap.
- Python 3.9 or later
- Docker (optional, for containerization)
-
Clone the repository:
git clone https://github.com/ntsedemoorg/hello-world-front.git cd hello-world-frontend
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate
-
Install the required packages:
pip install -r requirements.txt
-
Run the application:
python app.py
-
The frontend will be available at
http://localhost:5000
.
-
Build the Docker image:
docker build -t hello-world-frontend:latest .
-
Run the Docker container:
docker run -p 5000:5000 hello-world-frontend:latest
-
The frontend will be available at
http://localhost:5000
.
This repository includes a GitHub Actions workflow to build and push the Docker image to Docker Hub. Ensure you have the following GitHub secrets configured:
The workflow will trigger on pushes to the main
branch.
- Access the frontend at
http://localhost:5000
. - The frontend retrieves the message from the Golang API at
<API_URL>/api/hello
and displays it.