forked from loafle/openapi-generator-original
Run the server using PYTHONPATH and correct module (#17820)
Executing the command from the README file should allow the user to run the application. Without the proposed changes either the error message `Error loading ASGI app. Could not import module "main".` or `ModuleNotFoundError: No module named 'openapi_server'` is being returned.
This commit is contained in:
parent
aad345f0bd
commit
024c245ba7
@ -18,7 +18,7 @@ To run the server, please execute the following from the root directory:
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip3 install -r requirements.txt
|
pip3 install -r requirements.txt
|
||||||
uvicorn main:app --host 0.0.0.0 --port {{serverPort}}
|
PYTHONPATH=src uvicorn openapi_server.main:app --host 0.0.0.0 --port {{serverPort}}
|
||||||
```
|
```
|
||||||
|
|
||||||
and open your browser at `http://localhost:{{serverPort}}/docs/` to see the docs.
|
and open your browser at `http://localhost:{{serverPort}}/docs/` to see the docs.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user