Add Flask app and ignore venv
This commit is contained in:
parent
1b487ade07
commit
db457fab5b
2 changed files with 27 additions and 0 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -2,3 +2,6 @@
|
||||||
*.swp
|
*.swp
|
||||||
*~
|
*~
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
|
# Python virtual environment
|
||||||
|
venv/
|
||||||
|
|
|
||||||
24
app.py
Normal file
24
app.py
Normal 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)
|
||||||
Loading…
Reference in a new issue