#!/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()