Spaces:
Runtime error
Runtime error
Download app.py from Brozy123/LineUp-Bot: direct link, hf CLI and curl.
- Browser
- Download file 912 Bytes
-
https://huggingface.co/spaces/Brozy123/LineUp-Bot/resolve/main/app.py
- Command line
-
hf download hf://spaces/Brozy123/LineUp-Bot/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Brozy123/LineUp-Bot/resolve/main/app.py
912 Bytes
| from flask import Flask, send_from_directory, redirect | |
| app = Flask(__name__, static_folder='.', static_url_path='/') | |
| def index(): | |
| return send_from_directory('.', 'dashboard.html') | |
| def league(): | |
| # Serve the league page (alias) | |
| return send_from_directory('.', 'league.html') | |
| def league_trailing_slash(): | |
| # Redirect trailing slash to canonical path | |
| return redirect('/league.html') | |
| def league_html(): | |
| # Alias to support environments that request the .html path explicitly | |
| return send_from_directory('.', 'league.html') | |
| def static_proxy(path): | |
| # Serve static files (images, js, css) if referenced | |
| return send_from_directory('.', path) | |
| if __name__ == '__main__': | |
| import os | |
| port = int(os.environ.get('PORT', 8000)) | |
| app.run(host='0.0.0.0', port=port) |