23 lines
556 B
Python
23 lines
556 B
Python
#!/usr/bin/env python
|
|
import uvicorn
|
|
import os
|
|
from dotenv import load_dotenv
|
|
|
|
# Load environment variables
|
|
load_dotenv()
|
|
|
|
# Configuration from environment
|
|
host = os.getenv("HOST", "0.0.0.0")
|
|
port = int(os.getenv("PORT", "8000"))
|
|
reload = os.getenv("RELOAD", "false").lower() == "true"
|
|
|
|
if __name__ == "__main__":
|
|
print(f"Starting Nomad MCP service on {host}:{port}")
|
|
print(f"API documentation available at http://{host}:{port}/docs")
|
|
|
|
uvicorn.run(
|
|
"app.main:app",
|
|
host=host,
|
|
port=port,
|
|
reload=reload,
|
|
) |