From 7453af6b088fb4280a2ec20c5bedf4b9d27ec2db Mon Sep 17 00:00:00 2001 From: ION606 Date: Fri, 14 Feb 2025 22:50:44 -0500 Subject: [PATCH] added waitress --- README.md | 2 +- app.py | 4 +++- requirements.txt | 18 ++++++++++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 requirements.txt diff --git a/README.md b/README.md index d52f0b6..371872a 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ source .venv/bin/activate pip install -r requirements.txt python app.py ``` -And that's it! The app should be available at http://localhost:5000 +And that's it! The app should be available at http://localhost:5121 ## Contributing diff --git a/app.py b/app.py index a7a60ed..56521e5 100644 --- a/app.py +++ b/app.py @@ -23,6 +23,8 @@ from werkzeug.exceptions import NotFound import os import shutil from datetime import datetime, timedelta +from waitress import serve + app = Flask(__name__) app.config["SECRET_KEY"] = "your-secret-key" @@ -309,4 +311,4 @@ if __name__ == "__main__": os.makedirs(app.config["UPLOAD_FOLDER"], exist_ok=True) with app.app_context(): db.create_all() - app.run(debug=True) + serve(app, host="0.0.0.0", port=5121) diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..2c177b3 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,18 @@ +APScheduler==3.11.0 +blinker==1.9.0 +click==8.1.8 +Flask==3.1.0 +Flask-APScheduler==1.13.1 +Flask-Login==0.6.3 +Flask-SQLAlchemy==3.1.1 +greenlet==3.1.1 +itsdangerous==2.2.0 +Jinja2==3.1.5 +MarkupSafe==3.0.2 +python-dateutil==2.9.0.post0 +six==1.17.0 +SQLAlchemy==2.0.38 +typing_extensions==4.12.2 +tzlocal==5.3 +waitress==3.0.2 +Werkzeug==3.1.3