|
|
| """
|
| Simple entry point to run the 1proxy backend server.
|
| Usage: python run.py
|
| """
|
| import os
|
| from pathlib import Path
|
|
|
|
|
| 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("")
|
|
|
|
|
| uvicorn.run(
|
| "app.main:app",
|
| host="0.0.0.0",
|
| port=8000,
|
| reload=True,
|
| log_level="info"
|
| )
|
|
|