Skip to content

Commit 4173a64

Browse files
Ayush TiwariAyush Tiwari
authored andcommitted
Improved docs for better clarity on mounting ASGI apps
1 parent 5441767 commit 4173a64

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,15 @@ app = Starlette(
506506
]
507507
)
508508

509+
# To mount a specific path, provide the path in the mount_path argument or you can set it in the config
510+
'''
511+
app = Starlette(
512+
routes=[
513+
Mount('/weather', app=mcp.sse_app(mount_path="/weather")),
514+
]
515+
)
516+
'''
517+
509518
# or dynamically mount as host
510519
app.router.routes.append(Host('mcp.acme.corp', app=mcp.sse_app()))
511520
```

0 commit comments

Comments
 (0)