Files
team-tryouts/run.py
T

26 lines
727 B
Python

"""Entry point for the Team Tryouts application.
Usage (from the project root):
python run.py
Or for production with Waitress:
python app/wsgi.py
"""
import os
import sys
# Ensure the project root is on sys.path so 'app' is importable as a package
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from app.app import create_app
if __name__ == '__main__':
app = create_app()
debug_mode = os.getenv('FLASK_DEBUG', 'false').lower() == 'true'
if debug_mode:
app.logger.warning(
'Running in DEBUG mode with Flask built-in server. '
'This is NOT suitable for production. Use wsgi.py instead.'
)
app.run(debug=debug_mode, host='127.0.0.2', port=5000)