Ok, so I’ve added a
to the config, but I want to use Twisted and not Django, etc. So I tried creating myapp.py with
from twisted.web.wsgi import WSGIResource
from twisted.internet import reactor
def application(environ, start_response):
start_response(‘200 OK’, [(‘Content-type’, ‘text/plain’)])
return [‘Hello, world!’]
theapp = WSGIResource(reactor, reactor.getThreadPool(), application)
but this doesn’t seem to work. Then there’s teh issue of how to get that module to communicate with the hello.py backend… ayayay
On Friday, September 12, 2014 9:49:29 PM UTC+2, Daniel Faust wrote:
I think I understood that I can have crossbar serve HTTP content via the transports.paths configuration, where in the hello demo path “/” is type static serving directory …/hello/web and “/ws” is the websocket resource.
How can I add my own resource to let’s say “/api/v1”, one where I can define a def render(self, request): method?
Bonus question: how can this resource call methods in hello.py?