This is a simple web application using Python Flask.
Below are the steps required to get this working on a base linux system.
- Install all required dependencies
- Install and Configure Web Server
- Start Web Server
Python and its dependencies
apt-get install -y python3 python3-setuptools python3-dev build-essential python3-pip default-libmysqlclient-dev
If you are running your code on a macOS you can simply run the following code:
python3 -m venv env && source env/bin/activate&& pip install flask
Install Python Flask dependency
pip3 install flask
- Copy
app.py
or download it from a source repository - Configure database credentials and parameters
Start web server
FLASK_APP=app.py flask run --host=0.0.0.0
Open a browser and go to URL
http://<IP>:5000 => Welcome
http://<IP>:5000/how%20are%20you => I am good, how about you?