fix(forge): cast port to int (#6643)

When executing `port = os.getenv("PORT", 8000)` if the port is being fetched from a `.env` file it is fetched as a string.

This caused an error: `TypeError: 'str' object cannot be interpreted as an integer`
pull/6569/head^2
Or Arbel 2024-01-12 12:24:40 +02:00 committed by GitHub
parent 25cc6ad6ae
commit 48a2186cf3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -41,5 +41,5 @@ if __name__ == "__main__":
forge.sdk.forge_log.setup_logger()
uvicorn.run(
"forge.app:app", host="localhost", port=port, log_level="error", reload=True
"forge.app:app", host="localhost", port=int(port), log_level="error", reload=True
)