File size: 1,017 Bytes
66961f6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
35
36
#!/usr/bin/env python3
"""

Simple entry point to run the 1proxy backend server.

Usage: python run.py

"""
import os
from pathlib import Path

# Load environment variables from .env file
try:
    from dotenv import load_dotenv
    env_path = Path(__file__).parent / '.env'
    load_dotenv(dotenv_path=env_path)
    print(f"βœ… Loaded environment from: {env_path}")
except ImportError:
    print("⚠️  python-dotenv not installed. Install with: pip install python-dotenv")
except Exception as e:
    print(f"⚠️  Could not load .env file: {e}")

if __name__ == "__main__":
    import uvicorn
    
    print("πŸš€ Starting 1proxy Backend Server...")
    print("🌐 Server will be available at: http://localhost:8000")
    print("πŸ“š API Documentation: http://localhost:8000/docs")
    print("")
    
    # Run the FastAPI app with hot reload
    uvicorn.run(
        "app.main:app",
        host="0.0.0.0",
        port=8000,
        reload=True,
        log_level="info"
    )