import os import sys sys.path.append('.') # Set environment variables to ensure SQLite is used os.environ['NEON_DATABASE_URL'] = '' os.environ['DATABASE_URL'] = 'sqlite:///./todo_app.db' from src.main import create_app import uvicorn # Create the app instance with proper CORS configuration app = create_app() if __name__ == "__main__": port = int(os.environ.get("PORT", 8000)) # Use 0.0.0.0 instead of 127.0.0.1 for external access on Render uvicorn.run(app, host="0.0.0.0", port=port)