-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwsgi.py
More file actions
24 lines (19 loc) · 855 Bytes
/
wsgi.py
File metadata and controls
24 lines (19 loc) · 855 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""
☀ HELIOS — Production WSGI Entry Point
═══════════════════════════════════════
Use this with a production WSGI server:
waitress-serve --host=0.0.0.0 --port=5050 wsgi:application
gunicorn -w 4 -b 0.0.0.0:5050 wsgi:application
Never use `python app.py` in production.
"""
from app import create_app
application = create_app()
if __name__ == "__main__":
# Fallback: python wsgi.py still works but uses waitress if available
try:
from waitress import serve
print("☀ HELIOS — Production server (waitress)")
serve(application, host="0.0.0.0", port=5050, threads=8)
except ImportError:
print("☀ HELIOS — Dev server (install waitress for production)")
application.run(host="0.0.0.0", port=5050, debug=False)