mirror of
https://github.com/StefBuwalda/WebTech.git
synced 2025-10-30 11:19:58 +00:00
Merge pull request #2 from StefBuwalda/flask_env
Simple flask environment for development purposes
This commit is contained in:
17
run.py
Normal file
17
run.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
from flask import Flask
|
||||||
|
|
||||||
|
# Create Flask instance
|
||||||
|
app = Flask("__name__")
|
||||||
|
|
||||||
|
|
||||||
|
# Default app route
|
||||||
|
@app.route("/")
|
||||||
|
def index():
|
||||||
|
# Return HTML content
|
||||||
|
return "<h1>This is the default page</h1>"
|
||||||
|
|
||||||
|
|
||||||
|
# Prevent execution when imported by other script
|
||||||
|
if __name__ == "__main__":
|
||||||
|
# Start the flask server in debug mode for development purposes
|
||||||
|
app.run(port=80, debug=True)
|
||||||
0
static/.gitkeep
Normal file
0
static/.gitkeep
Normal file
0
templates/.gitkeep
Normal file
0
templates/.gitkeep
Normal file
Reference in New Issue
Block a user