Auto-generated by Trail System

This commit is contained in:
Ivan087
2025-11-28 11:07:38 +08:00
commit e507646aa8
7 changed files with 82 additions and 0 deletions

21
app.py Normal file
View File

@ -0,0 +1,21 @@
from flask import Flask
app = Flask(__name__)
@app.route('/')
def home():
"""Handle the root endpoint, returns 'Todo List' as a string."""
return 'Todo List'
@app.errorhandler(404)
def not_found(e):
"""Handle 404 Not Found errors with a custom message."""
return 'Page not found', 404
@app.errorhandler(500)
def server_error(e):
"""Handle 500 Internal Server Error with a custom message."""
return 'Internal server error', 500
if __name__ == '__main__':
app.run(debug=False)