-
Notifications
You must be signed in to change notification settings - Fork 38
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
Add website.run() method #441
Comments
Sure, but let's call it |
Why it is not suitable for production? I don't see why it can not be used for small sites. |
Well, you said it yourself in the docstring:
|
Yes, but it is because Gratipay uses deployment through a Heroku defined process. I don't know which server do they prefer and why. |
The limitation with |
Not a chance that I will remember those. Note that Flask provides |
werkzeug.serving is also single-threaded and single-process.
I don't like that from aspen import publish, Website
website = Website()
if __name__ == '__main__':
publish(website) (P.S. Flask doesn't use |
Then I see no reasons not to have
I also don't like that Website inherits from Configuration instead of encapsulating it.
For me publishing means
It names it |
I vote no Website.run() because it moves WSGI-server code into the main core. Python -m aspen is convenient enough. |
Yeah, I can see that.
I agree, but that's a separate issue: reticketed as #444 and added to the roadmap (#357).
Too late. We already have WSGI-server code in the main core.
Here it means "put it on the network." I chose from aspen import serve, Website
website = Website()
if __name__ == '__main__':
serve(website)
Right. |
Makes the quickstart quicker; closes #441.
C'mon, we did this already - down this path lies engines and etc. |
@pjz And against "down this path lies engines and etc.," consider the example of Flask and Django. They both provide this convenience, and as @techtonik suggests: "I thinks that's became pretty obvious in Python world [that this is not a high-performance server], but could be explained once more in docstring." |
alright fine. As soon as it passes tests. |
Done, though because of #446 I dropped back to: from aspen import serve, website
website = website.Website()
if __name__ == '__main__':
serve(website) |
@whit537 note that |
Why not? |
Because by default webservers look for |
what webservers? Link to docs, please. |
https://code.google.com/p/modwsgi/wiki/QuickConfigurationGuide#WSGI_Application_Script_File |
https://uwsgi-docs.readthedocs.org/en/latest/WSGIquickstart.html#the-first-wsgi-application |
https://gunicorn-docs.readthedocs.org/en/latest/run.html#django |
Need more? =) |
@techtonik Bound variable name is a bad test for the validity of a WSGI application, because all three of the servers you cite will, in fact, have no problem using a |
Actually, the one place it's relevant is in |
Not sure about the |
Ok. Didn't know that |
Sounds like someone hasn't read the fine 📖, nor used a 🔍 engine. ;-) |
Easing mod_wsgi configuration reticketed as #452, based on the search results I just looked at. :-) |
Well, at first I was thinking that |
Makes the quickstart quicker; closes #441.
To avoid writing this for every app:
Do that:
The text was updated successfully, but these errors were encountered: