A simple Python Flask web application that displays a personalised greeting message in the browser.
The objective of this project was to understand:
- How a Flask application is structured
- How HTTP routing works
- Running a local development server
- Using Git for version control
- Basic cloud deployment considerations
- Python 3
- Flask
- Git
- Linux / WSL environment
.
├── app.py
├── requirements.txt
└── README.md
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello_world():
return "<p>Hello Faizal!</p>"
if __name__ == '__main__':
app.run(host="0.0.0.0", port=8080)- Install dependencies:
pip install flask
- Run the application:
python3 app.py
- Open your browser and visit:
http://127.0.0.1:8080
The following Git workflow was used:
git clone https://github.com/mfaizalbe/flask-app
git add .
git commit -m "Initial Flask application"
git push
As an extension, this application can be deployed to an AWS EC2 instance by:
- Launching an Ubuntu or Amazon Linux EC2 instance
- Configuring security group rules (open port 8080)
- Running the Flask app on the instance
- Accessing the application via the EC2 public IP
Future improvements may include:
- Using Gunicorn as a production server
- Adding Nginx as a reverse proxy
- Containerising with Docker
- Deploying via CI/CD pipeline
This project strengthened my understanding of:
- Backend web development fundamentals
- Request–response lifecycle
- Local development environments
- Git-based version control
- Introductory cloud deployment concepts