Skip to content

Conversation

buurro
Copy link
Member

@buurro buurro commented Sep 16, 2025

This PR add support for the PORT environment variable in the fastapi dev and fastapi run commands.

If both the PORT environment variable and the --port CLI argument are set, the CLI argument will be used.

@buurro buurro added the feature New feature or request label Sep 16, 2025
Copy link
Member

@tiangolo tiangolo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you! 🚀

@tiangolo tiangolo merged commit 45bf75b into main Sep 17, 2025
18 checks passed
@tiangolo tiangolo deleted the feat/port-env-variable branch September 17, 2025 19:07
@babs
Copy link

babs commented Sep 24, 2025

I know I come after the battle but it might be interesting to prefix the env var name with FASTAPI_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants