mirror of https://github.com/tiangolo/fastapi.git
📝 Update includes in `docs/en/docs/advanced/sub-applications.md` (#12806)
This commit is contained in:
parent
589f3c0e59
commit
334d8326d0
|
|
@ -10,9 +10,7 @@ If you need to have two independent FastAPI applications, with their own indepen
|
||||||
|
|
||||||
First, create the main, top-level, **FastAPI** application, and its *path operations*:
|
First, create the main, top-level, **FastAPI** application, and its *path operations*:
|
||||||
|
|
||||||
```Python hl_lines="3 6-8"
|
{* ../../docs_src/sub_applications/tutorial001.py hl[3, 6:8] *}
|
||||||
{!../../docs_src/sub_applications/tutorial001.py!}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Sub-application
|
### Sub-application
|
||||||
|
|
||||||
|
|
@ -20,9 +18,7 @@ Then, create your sub-application, and its *path operations*.
|
||||||
|
|
||||||
This sub-application is just another standard FastAPI application, but this is the one that will be "mounted":
|
This sub-application is just another standard FastAPI application, but this is the one that will be "mounted":
|
||||||
|
|
||||||
```Python hl_lines="11 14-16"
|
{* ../../docs_src/sub_applications/tutorial001.py hl[11, 14:16] *}
|
||||||
{!../../docs_src/sub_applications/tutorial001.py!}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Mount the sub-application
|
### Mount the sub-application
|
||||||
|
|
||||||
|
|
@ -30,9 +26,7 @@ In your top-level application, `app`, mount the sub-application, `subapi`.
|
||||||
|
|
||||||
In this case, it will be mounted at the path `/subapi`:
|
In this case, it will be mounted at the path `/subapi`:
|
||||||
|
|
||||||
```Python hl_lines="11 19"
|
{* ../../docs_src/sub_applications/tutorial001.py hl[11, 19] *}
|
||||||
{!../../docs_src/sub_applications/tutorial001.py!}
|
|
||||||
```
|
|
||||||
|
|
||||||
### Check the automatic API docs
|
### Check the automatic API docs
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue