Skip to content

Instantly share code, notes, and snippets.

@FZambia
Created January 22, 2015 20:17
Show Gist options
  • Save FZambia/18193b53ed2a978be13d to your computer and use it in GitHub Desktop.
Save FZambia/18193b53ed2a978be13d to your computer and use it in GitHub Desktop.
centrifuge_plus_tornado
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()
@FZambia
Copy link
Author

FZambia commented Jan 22, 2015

Tornado will be on http://localhost:8888/
Centrifuge will be on http://localhost:8000/
Routing in Nginx must be configured properly in this case

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment