summaryrefslogtreecommitdiff
path: root/docs/narr
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2010-11-02 23:21:34 -0400
committerChris McDonough <chrism@plope.com>2010-11-02 23:21:34 -0400
commit008a4c4b450770c6efa8a2779822d3b6b96ef3d9 (patch)
tree0ea441177ebcecf20fe6e70a10e3065f36438ce3 /docs/narr
parent0bd22602a5be415b0864ca87f85f6835660009b7 (diff)
downloadpyramid-008a4c4b450770c6efa8a2779822d3b6b96ef3d9.tar.gz
pyramid-008a4c4b450770c6efa8a2779822d3b6b96ef3d9.tar.bz2
pyramid-008a4c4b450770c6efa8a2779822d3b6b96ef3d9.zip
more explicit about the way to start the application
Diffstat (limited to 'docs/narr')
-rw-r--r--docs/narr/firstapp.rst27
1 files changed, 19 insertions, 8 deletions
diff --git a/docs/narr/firstapp.rst b/docs/narr/firstapp.rst
index 71219689d..8828be8e1 100644
--- a/docs/narr/firstapp.rst
+++ b/docs/narr/firstapp.rst
@@ -45,10 +45,16 @@ configured imperatively:
app = config.make_wsgi_app()
serve(app, host='0.0.0.0')
-When this code is inserted into a Python script named
-``helloworld.py`` and executed by a Python interpreter which has the
-:mod:`pyramid` software installed, an HTTP server is started on TCP
-port 8080. When port 8080 is visited by a browser on the root URL
+When this code is inserted into a Python script named ``helloworld.py`` and
+executed by a Python interpreter which has the :mod:`pyramid` software
+installed, an HTTP server is started on TCP port 8080:
+
+.. code-block:: bash
+
+ $ python helloworld.py
+ serving on 0.0.0.0:8080 view at http://127.0.0.1:808
+
+When port 8080 is visited by a browser on the root URL
(``/``), the server will simply serve up the text "Hello world!" When
visited by a browser on the URL ``/goodbye``, the server will serve up
the text "Goodbye world!"
@@ -421,11 +427,16 @@ the previously created ``helloworld.py``:
</configure>
This pair of files forms an application functionally equivalent to the
-application we created earlier in :ref:`helloworld_imperative`.
-Let's examine the differences between the code in that section and the
-code above.
+application we created earlier in :ref:`helloworld_imperative`. We can run
+it the same way.
+
+.. code-block:: bash
+
+ $ python helloworld.py
+ serving on 0.0.0.0:8080 view at http://127.0.0.1:808
-In :ref:`helloworld_imperative_appconfig`, we had the following lines
+Let's examine the differences between the code in that section and the code
+above. In :ref:`helloworld_imperative_appconfig`, we had the following lines
within the ``if __name__ == '__main__'`` section of ``helloworld.py``:
.. code-block:: python