i was tried to run my uvicorn fastapi in my computer server but it listened for localhost:8000, not on its ip address. I want to access my api from my client computer. Anybody have some suggestion? thx
uvicorn --help | grep host > uvicorn --host 0.0.0.0 your:app
uvicorn --help | grep host>uvicorn --host 0.0.0.0 your:app
i'm using windows so i can't execute grep command
Sorry, shall I have been more clear: you don't actually need grep, that was just a hint to mark that with uvicorn --help (as for mostly any other program) you will get all the possible options you have with that command. As for you question specific problem, the command you're looking for probably is: uvicorn --host 0.0.0.0 your:app. Hope that helped!
Thanks @stefanondisponibile for the help!
@jonathanrsmjtk You can read the docs for Uvicorn here: https://www.uvicorn.org/
Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues.
Most helpful comment
uvicorn --help | grep host>uvicorn --host 0.0.0.0 your:app