-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
28 lines (18 loc) · 720 Bytes
/
main.py
File metadata and controls
28 lines (18 loc) · 720 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
import os
from dotenv import load_dotenv
# Load environment variables from .env file BEFORE importing trackers
load_dotenv()
from trackers import create_app
# Create the Flask application instance for WSGI deployment
app = create_app()
def main():
"""Main entry point for local development."""
# 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})")
# Run the Flask development server
app.run(host=host, port=port, debug=debug)
if __name__ == "__main__":
main()