File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
packages/apps/src/microsoft/teams/apps Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,14 @@ def __init__(
7979 skip_auth: Whether to skip JWT validation.
8080 server_factory: Optional function that takes an ASGI app
8181 and returns a configured `uvicorn.Server`.
82+ Example:
83+ ```python
84+ def custom_server_factory(app: FastAPI) -> uvicorn.Server:
85+ return uvicorn.Server(config=uvicorn.Config(app, host="0.0.0.0", port=8000))
86+
87+
88+ http_plugin = HttpPlugin(app_id="your-app-id", server_factory=custom_server_factory)
89+ ```
8290 """
8391 super ().__init__ ()
8492 self .logger = logger or ConsoleLogger ().create_logger ("@teams/http-plugin" )
@@ -167,7 +175,7 @@ async def on_start(self, event: PluginStartEvent) -> None:
167175 try :
168176 if self ._server and self ._server .config .port != self ._port :
169177 self .logger .warning (
170- "Using port configured by server factory: %d, but plugin had requested port %d." ,
178+ "Using port configured by server factory: %d, but plugin start event has port %d." ,
171179 self ._server .config .port ,
172180 self ._port ,
173181 )
You can’t perform that action at this time.
0 commit comments