-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.py
More file actions
32 lines (21 loc) · 697 Bytes
/
run.py
File metadata and controls
32 lines (21 loc) · 697 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
25
26
27
28
29
30
31
32
#!/usr/bin/env python3
"""
Simple script to run the Flask application.
Usage: uv run python run.py
"""
import os
from dotenv import load_dotenv
# Load environment variables from .env file
load_dotenv()
from trackers import create_app
def main():
"""Run the Flask development server."""
app = create_app()
# Get configuration from environment variables
host = os.getenv("FLASK_HOST", "0.0.0.0")
port = int(os.getenv("FLASK_PORT", "5000"))
debug = os.getenv("FLASK_DEBUG", "true").lower() in ("true", "1", "yes")
print(f"Starting Flask app on {host}:{port} (debug={debug})")
app.run(host=host, port=port, debug=debug)
if __name__ == "__main__":
main()