Created
January 22, 2015 20:17
-
-
Save FZambia/18193b53ed2a978be13d to your computer and use it in GitHub Desktop.
centrifuge_plus_tornado
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tornado.ioloop | |
import tornado.web | |
from centrifuge.node import create_centrifuge_application | |
class MainHandler(tornado.web.RequestHandler): | |
def get(self): | |
self.write("Hello, world") | |
application = tornado.web.Application([ | |
(r"/", MainHandler), | |
]) | |
if __name__ == "__main__": | |
application.listen(8888) | |
create_centrifuge_application() | |
tornado.ioloop.IOLoop.instance().start() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tornado will be on http://localhost:8888/
Centrifuge will be on http://localhost:8000/
Routing in Nginx must be configured properly in this case