diff --git a/.idea/Hello_World.iml b/.idea/Hello_World.iml index 2c80e12..6f1ddae 100644 --- a/.idea/Hello_World.iml +++ b/.idea/Hello_World.iml @@ -4,7 +4,7 @@ - + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 665ba96..16ccfe0 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -3,5 +3,5 @@ - + \ No newline at end of file diff --git a/main.py b/main.py index 0c5ea27..e857462 100644 --- a/main.py +++ b/main.py @@ -1 +1,23 @@ -print('Hello World Nummer 2') \ No newline at end of file +# app.py + +from flask import Flask + +# Eine Flask-Anwendung instanziieren +app = Flask(__name__) + +# Eine Route für die URL-Endpunkt '/' definieren +@app.route('/') +def hello_world(): + """ + Diese Funktion wird ausgeführt, wenn der Basis-URL aufgerufen wird. + Sie gibt einen einfachen String zurück. + """ + return 'Hallo vom kibero Server! Die Anwendung läuft!' + +# Optional: Nur zum lokalen Testen. Auf einem Server wird dies typischerweise +# von einem WSGI-Server (wie Gunicorn oder uWSGI) aufgerufen. +if __name__ == '__main__': + # Startet den Flask-Entwicklungsserver. + # host='0.0.0.0' macht die Anwendung von außen erreichbar (nicht nur localhost). + # port=5000 ist der Standard-Port für Flask. + app.run(host='0.0.0.0', port=5000) \ No newline at end of file