Skip to content

Commit b24e4cb

Browse files
authored
Add port parameter to web_app (#917)
1 parent 426cecd commit b24e4cb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

slack_bolt/app/async_app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -470,7 +470,7 @@ def server(
470470
)
471471
return self._server
472472

473-
def web_app(self, path: str = "/slack/events") -> web.Application:
473+
def web_app(self, path: str = "/slack/events", port: int = 3000) -> web.Application:
474474
"""Returns a `web.Application` instance for aiohttp-devtools users.
475475
476476
from slack_bolt.async_app import AsyncApp
@@ -488,8 +488,9 @@ def app_factory():
488488
489489
Args:
490490
path: The path to receive incoming requests from Slack
491+
port: The port to listen on (Default: 3000)
491492
"""
492-
return self.server(path=path).web_app
493+
return self.server(path=path, port=port).web_app
493494

494495
def start(self, port: int = 3000, path: str = "/slack/events", host: Optional[str] = None) -> None:
495496
"""Start a web server using AIOHTTP.

0 commit comments

Comments
 (0)