Skip to content

Expose on different port #253

Answered by rszamszur
amrap030 asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @amrap030

The gunicorn.py is a part of the package. For development, make sure you have installed your project in editable mode to always have the latest changes. However, you can still override the gunicorn.py default port by one of the following:

  1. Using environment variable: export FASTAPI_BIND=127.0.0.1:7000
  2. Using CLI serve command --bind option: $YOUR_PROJECT_SCRIPT_NAME serve --bind 127.0.0.1:7000

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by amrap030
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants