Spaces:
Running
Running
File size: 829 Bytes
5f3e9f5 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | """WSGI entry point for production servers.
Linux/Mac:
gunicorn -w 4 -b 127.0.0.1:5000 wsgi:app
Windows:
waitress-serve --listen=127.0.0.1:5000 wsgi:app
Bind to 127.0.0.1 unless you have an authenticating reverse proxy in front
(nginx with mTLS, Cloudflare Tunnel, etc.). Setting API_KEY on top of an
exposed port is acceptable for trusted users but not a substitute for TLS.
"""
import os
import sys
# Match app.py's path setup so blueprints can resolve `core.*` and `utils.*`
sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src'))
from app import app # noqa: E402 re-export Flask app as WSGI callable
# Some WSGI servers look for `application` rather than `app`.
application = app
if __name__ == '__main__': # pragma: no cover
app.run(host='127.0.0.1', port=int(os.environ.get('PORT', 5000)))
|