Add test endpoint to Flask application

This commit is contained in:
Dominik Krenn 2025-06-11 07:59:26 +02:00
parent d6f44f1a87
commit 27bcdaf46f

6
app.py
View File

@ -1,4 +1,4 @@
from flask import Flask
from flask import Flask, jsonify
app = Flask(__name__)
@ -6,5 +6,9 @@ app = Flask(__name__)
def index():
return "Hello, World!"
@app.route('test')
def test():
return jsonify({"message": "This is a test endpoint!"}), 200
if __name__ == '__main__':
app.run(debug=True, host='127.0.0.1', port=5050)