]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Revert "Undo documentation changes from the introduction of Application.listen()."
authorBen Darnell <ben@bendarnell.com>
Wed, 16 Feb 2011 19:52:06 +0000 (11:52 -0800)
committerBen Darnell <ben@bendarnell.com>
Wed, 16 Feb 2011 19:52:06 +0000 (11:52 -0800)
This reverts commit 2d42c18c36bb9bd6ff67dc71786cd6ce9332dd31.

website/templates/documentation.txt
website/templates/index.html

index 09b928e5740e8519d6e058f0d11184604528f04a..b1a903a39a1807dbc3e4dd4f7e70c8f46dfcf6c2 100644 (file)
@@ -23,7 +23,6 @@ thousands of clients, see
 
 Here is the canonical "Hello, world" example app:
 
-    import tornado.httpserver
     import tornado.ioloop
     import tornado.web
 
@@ -36,8 +35,7 @@ Here is the canonical "Hello, world" example app:
     ])
 
     if __name__ == "__main__":
-        http_server = tornado.httpserver.HTTPServer(application)
-        http_server.listen(8888)
+        application.listen(8888)
         tornado.ioloop.IOLoop.instance().start()
 
 See [Tornado walkthrough](#tornado-walkthrough) below for a detailed
index 359e9e2e28cc3d4c7aff784b3d970afda3ce0f79..a409dade2386471859e072aacbde2d6045b9ed9d 100644 (file)
@@ -26,8 +26,7 @@ sudo python setup.py install</code></pre>
 
   <h2>Hello, world</h2>
   <p>Here is the canonical &quot;Hello, world&quot; example app for Tornado:</p>
-  <pre><code>import tornado.httpserver
-import tornado.ioloop
+  <pre><code>import tornado.ioloop
 import tornado.web
 
 class MainHandler(tornado.web.RequestHandler):
@@ -39,8 +38,7 @@ application = tornado.web.Application([
 ])
 
 if __name__ == "__main__":
-    http_server = tornado.httpserver.HTTPServer(application)
-    http_server.listen(8888)
+    application.listen(8888)
     tornado.ioloop.IOLoop.instance().start()</code></pre>
   <p>See the <a href="/documentation">Tornado documentation</a> for a detailed walkthrough of the framework.</p>