Skip to content

Commit

Permalink
use production server to serve
Browse files Browse the repository at this point in the history
  • Loading branch information
Highfire1 committed Nov 15, 2024
1 parent c1bba3c commit ff19af6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 8 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import sys
from flask import Flask, redirect

app = Flask(__name__)
Expand Down Expand Up @@ -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)
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
Flask==2.2.5 # Specify the version you want to use
Werkzeug==2.2.2
Werkzeug==2.2.2
waitress

0 comments on commit ff19af6

Please sign in to comment.