-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_server.py
More file actions
34 lines (29 loc) · 883 Bytes
/
Copy pathrun_server.py
File metadata and controls
34 lines (29 loc) · 883 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
33
34
#!/usr/bin/env python3
"""
Run script for DataIntel Hub Backend - FastAPI Server
"""
import uvicorn
import os
from dotenv import load_dotenv
# Load environment variables
load_dotenv()
if __name__ == "__main__":
# Get configuration from environment variables
host = os.getenv("HOST", "0.0.0.0")
port = int(os.getenv("PORT", 8000))
reload = os.getenv("NODE_ENV", "development") == "development"
print(f"🚀 Starting DataIntel Hub Backend server...")
print(f"📍 Host: {host}")
print(f"🔌 Port: {port}")
print(f"🔄 Reload: {reload}")
print(f"📖 API Documentation: http://{host}:{port}/docs")
print(f"📚 ReDoc Documentation: http://{host}:{port}/redoc")
print("=" * 50)
# Run the server
uvicorn.run(
"main:app",
host=host,
port=port,
reload=reload,
log_level="info"
)