1. diff --git a/demos/helloworld/helloworld.py b/demos/helloworld/helloworld.py
  2. index 754f72f..1910ef0 100755
  3. --- a/demos/helloworld/helloworld.py
  4. +++ b/demos/helloworld/helloworld.py
  5. @@ -14,9 +14,10 @@
  6. # License for the specific language governing permissions and limitations
  7. # under the License.
  8.  
  9. -import tornado.httpserver
  10. -import tornado.ioloop
  11. +from twisted.internet import reactor
  12. +
  13. import tornado.options
  14. +import tornado.twister
  15. import tornado.web
  16. import logging
  17.  
  18. @@ -35,9 +36,11 @@ def main():
  19. application = tornado.web.Application([
  20. (r"/", MainHandler),
  21. ])
  22. - http_server = tornado.httpserver.HTTPServer(application)
  23. - http_server.listen(options.port)
  24. - tornado.ioloop.IOLoop.instance().start()
  25. +
  26. + site = tornado.twister.TornadoSite(application)
  27. + reactor.listenTCP(options.port, site)
  28. +
  29. + reactor.run()
  30.  
  31.  
  32. if __name__ == "__main__":
  33.