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

Implement web.run_app utility function #734

Merged
merged 20 commits into from
Jan 13, 2016
Merged

Implement web.run_app utility function #734

merged 20 commits into from
Jan 13, 2016

Conversation

asvetlov
Copy link
Member

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.

@asvetlov asvetlov changed the title Run app Implement web.run_app utility function Jan 12, 2016
@asvetlov asvetlov added this to the 0.21 milestone Jan 12, 2016
else:
port = 8443

if loop is None:
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point!

@rutsky
Copy link
Member

rutsky commented Jan 13, 2016

LGTM

ssl=ssl_context))

scheme = 'https' if ssl_context else 'http'
prompt = '127.0.0.1' if host == '0.0.0.0' else host
Copy link
Member

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?

Copy link
Member

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))

Copy link
Member

Choose a reason for hiding this comment

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

Use :: for IPv6 (:

Copy link
Member Author

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?

Copy link
Member

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)

asvetlov added a commit that referenced this pull request Jan 13, 2016
Implement web.run_app utility function
@asvetlov asvetlov merged commit 90f1616 into master Jan 13, 2016
@asvetlov asvetlov deleted the run_app branch January 13, 2016 11:40
@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants