| #!/usr/bin/env python3 | |
| """ | |
| Simple run script for the Workflow Engine. | |
| Usage: | |
| python run.py | |
| Or with custom settings: | |
| HOST=127.0.0.1 PORT=8080 python run.py | |
| """ | |
| import uvicorn | |
| import os | |
| def main(): | |
| """Run the FastAPI application.""" | |
| host = os.getenv("HOST", "0.0.0.0") | |
| port = int(os.getenv("PORT", "8000")) | |
| reload = os.getenv("RELOAD", "true").lower() == "true" | |
| print(f""" | |
| βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| β FlowGraph π β | |
| β β | |
| β A lightweight workflow orchestration engine β | |
| β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£ | |
| β Server: http://{host}:{port} β | |
| β API Docs: http://{host}:{port}/docs β | |
| β ReDoc: http://{host}:{port}/redoc β | |
| β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£ | |
| β Demo workflow ID: code-review-demo β | |
| βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| """) | |
| uvicorn.run( | |
| "app.main:app", | |
| host=host, | |
| port=port, | |
| reload=reload, | |
| log_level="info", | |
| ) | |
| if __name__ == "__main__": | |
| main() | |