init
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
"""Run the build API with Uvicorn."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
|
||||
import uvicorn
|
||||
|
||||
from .app import create_application
|
||||
|
||||
|
||||
def main() -> None:
|
||||
host = os.environ.get("BUILD_API_HOST", "127.0.0.1")
|
||||
port = int(os.environ.get("BUILD_API_PORT", "8081"))
|
||||
application = create_application()
|
||||
print(f"build API listening on http://{host}:{port}", flush=True)
|
||||
uvicorn.run(application, host=host, port=port, log_level="info")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user