phase 3 done
All checks were successful
Enterprise AI Code Review / ai-review (pull_request) Successful in 44s
All checks were successful
Enterprise AI Code Review / ai-review (pull_request) Successful in 44s
This commit is contained in:
35
run_web.py
Normal file
35
run_web.py
Normal file
@@ -0,0 +1,35 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Run the Loyal Companion Web platform."""
|
||||
|
||||
import sys
|
||||
|
||||
import uvicorn
|
||||
|
||||
from loyal_companion.config import settings
|
||||
|
||||
|
||||
def main():
|
||||
"""Run the web server."""
|
||||
if not settings.database_url:
|
||||
print("ERROR: DATABASE_URL not configured!")
|
||||
print("The Web platform requires a PostgreSQL database.")
|
||||
print("Please set DATABASE_URL in your .env file.")
|
||||
sys.exit(1)
|
||||
|
||||
print(f"Starting Loyal Companion Web Platform...")
|
||||
print(f"Server: http://{settings.web_host}:{settings.web_port}")
|
||||
print(f"API Docs: http://{settings.web_host}:{settings.web_port}/docs")
|
||||
print(f"Platform: Web (HIGH intimacy)")
|
||||
print()
|
||||
|
||||
uvicorn.run(
|
||||
"loyal_companion.web:app",
|
||||
host=settings.web_host,
|
||||
port=settings.web_port,
|
||||
reload=True, # Auto-reload on code changes (development)
|
||||
log_level=settings.log_level.lower(),
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user