Coding in Python 24 - Serving an HTML Site with Flask

Originally published at: Coding in Python 24 – Serving an HTML Site with Flask – LearnLinuxTV

Code used in this Video Setting up the environment virtualenv -p /usr/bin/python3 my-project cd my-project source bin/activate pip install Flask Running a simple web page #!/usr/bin/env python3 from flask import Flask app = Flask(name) @app.route("/") def message(): return “Python is awesome!” app.run() ==== Flask with debug option ==== #!/usr/bin/env python3 from flask import Flask app…

1 Like