Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: display web server URL in console when executing run command #129

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

tumidi
Copy link
Contributor

@tumidi tumidi commented Oct 24, 2024

Zeigt die URLs vom Dev-Server an, wenn der run-Befehl verwendet wird.

@@ -84,6 +87,7 @@ async def start_server(self) -> None:
self._runner = web.AppRunner(self._web_app)
await self._runner.setup()
await web.TCPSite(self._runner, self._host, self._port).start()
self._print_urls()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was spricht dagegen, einfach nur f"http://{self._host}:{self._port}" auszugeben?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Das würde nicht alle Adressen auflisten, auf dem der Webserver horcht:

$ questionpy-sdk run examples/minimal
INFO:questionpy-sdk:web-server:Webserver started: http://[::1]:8080 http://127.0.0.1:8080

versus

$ questionpy-sdk run examples/minimal
INFO:questionpy-sdk:web-server:Webserver started: http://localhost:8080

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Schon klar, aber ist das nötig? Bei den anderen Tools die ich kenne, die mir ihre URL in der Konsole ausgeben, wird mir immer nur eine angezeigt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants