1. Simple HTTP Website with Flask
Installing & Creating Folders
pip install flask #run this in your terminal
mkdir Flask-Project #create a folder to store files
cd Flask-Project #enter your folderOur Web Server File(copy & paste)
#main.py -> Copy and paste this into main.py file in your Flask-Project folder
from flask import Flask, render_template, request, redirect
app = Flask(__name__)
@app.route("/", methods=['GET'])
def index():
return "200 working"
if __name__ == "__main__":
app.run(host="0.0.0.0", port=80, debug=True)
Last updated