
The factory for twisted.web.resource Resources is twisted.web.server.Site On Thu, Mar 31, 2011 at 4:45 AM, Aljoša Mohorović < aljosa.mohorovic@gmail.com> wrote:
now i looking at adding an wsgi app to this setup. i'm reading http://twistedmatrix.com/documents/current/web/howto/web-in-60/wsgi.html but can't figure out howto get factory for wsgi if i have:
=== def application(environ, start_response): start_response('200 OK', [('Content-type', 'text/plain')]) return ['Hello, world!'] resource = WSGIResource(reactor, reactor.getThreadPool(), application) ===
i'm looking for something like "reactor.listenTCP(10000, wsgi_factory)" but don't know howto do it. please point me to proper docs.
factory = Site(resource) reactor.listenTCP(10000, factory) reactor.run() see here: http://twistedmatrix.com/documents/current/web/howto/web-in-60/dynamic-conte...
thanks
Aljosa
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python