-
-
Notifications
You must be signed in to change notification settings - Fork 753
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add --app-dir option for running uvicorn from any location #619
Add --app-dir option for running uvicorn from any location #619
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My two cents on the --app-dir
vs --chdir
naming…
The gunicorn description of --chdir
is:
Chdir to specified directory before apps loading.
This is not accurately what we do here — we don't cd
or really change the working directory. Instead, we allow Python to find the APP
in the specified directory by adding it to sys.path
.
So --app-dir
is probably okay IMO?
Update --app-dir description Co-Authored-By: Florimond Manca <[email protected]>
Waiting the approval of this meaningful PR. 😭 //cc @florimondmanca |
& //cc @tomchristie |
Yup, I like this, thanks! One query about the phrasing of the help text... should we maybe prefer "Defaults to the current working directory."? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fab, thanks!
This PR is an attempt to solve #549
I chose
--app-dir
to be the name of the option, please let me know if it makes sense, I've also updated the documentation to include--app-dir
option, please check if I have added it to the right place.