Add Flask app and ignore venv

This commit is contained in:
Tahar Lamred & Theresa Nerz 2026-06-19 13:18:59 +02:00
parent 1b487ade07
commit db457fab5b
2 changed files with 27 additions and 0 deletions

3
.gitignore vendored
View file

@ -2,3 +2,6 @@
*.swp
*~
.DS_Store
# Python virtual environment
venv/

24
app.py Normal file
View file

@ -0,0 +1,24 @@
from flask import Flask, render_template_string
app = Flask(__name__)
@app.route('/')
@app.route('/app/')
def home():
return render_template_string(
'''<!doctype html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>Meine erste Flask-App</title>
</head>
<body>
<h1>Meine erste Flask-App</h1>
<p>Willkommen auf <strong>/app/</strong>.</p>
<p>Diese Seite läuft in Flask.</p>
</body>
</html>'''
)
if __name__ == '__main__':
app.run(host='0.0.0.0', port=5000, debug=True)