Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

Commit

Permalink
use production WSGI server
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivia-li committed Dec 6, 2022
1 parent 162e7ca commit 394033a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions bin/waitress-serve
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/Users/oliviali/Development/text-chatgpt/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from waitress.runner import run
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(run())
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ def timeout():


if __name__ == "__main__":
port = int(os.environ.get('PORT', 3000))
app.run(debug=True, host='0.0.0.0', port=port)
from waitress import serve
serve(app, host="0.0.0.0", port=8080)
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ soupsieve==2.3.2.post1
tls-client==0.1.5
twilio==7.15.4
urllib3==1.26.13
waitress==2.1.2
Werkzeug==2.2.2
zipp==3.11.0

0 comments on commit 394033a

Please sign in to comment.