diff --git a/main.py b/main.py index 864f2b8..84e282d 100644 --- a/main.py +++ b/main.py @@ -1,3 +1,4 @@ +import sys from flask import Flask, redirect app = Flask(__name__) @@ -29,4 +30,10 @@ def redirect_link(path): if __name__ == '__main__': - app.run(debug=True) + + if "-dev" in sys.argv: + app.run(debug=True) + + else: + from waitress import serve + serve(app, host="0.0.0.0", port=5000, threads=20) \ No newline at end of file diff --git a/requirements.txt b/requirements.txt index 772a612..c067ebd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ Flask==2.2.5 # Specify the version you want to use -Werkzeug==2.2.2 \ No newline at end of file +Werkzeug==2.2.2 +waitress \ No newline at end of file