-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Implement web.run_app utility function #734
Conversation
else: | ||
port = 8443 | ||
|
||
if loop is None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is an explicit loop
parameter necessary -- Wouldn't loop = app.loop
suffice here?
Is there a use case where the App would run on a different loop than the Server?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point!
LGTM |
ssl=ssl_context)) | ||
|
||
scheme = 'https' if ssl_context else 'http' | ||
prompt = '127.0.0.1' if host == '0.0.0.0' else host |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How should someone bind to public interface?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, read from end to top))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use ::
for IPv6 (:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I don't follow.
Isn't knowledge of host/port info enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I already said -- I read diff from bottom to top) thought that you replaced '0.0.0.0' with localhost and bind to it)
Implement web.run_app utility function
Fix for #690
Let's delay
python -m aiohttp.web HOST PORT pkg.module.main [ARGS]
for a while.I've created #733 for that.
The PR adds
run_app
utility function along with docs and tests.