summaryrefslogtreecommitdiff
path: root/docs/narr
diff options
context:
space:
mode:
authorMartin <martin.frlin@gmail.com>2016-12-06 10:43:22 +0100
committerMartin <martin.frlin@gmail.com>2016-12-07 10:32:13 +0100
commit07e802fa7d6a63a69b31514923f85d6e76dd33e8 (patch)
treeec9ce4c07a5a824b90383a6090b26339ef2d63df /docs/narr
parent8bc0f9a68c4f19533ccdf4486656f2a106a81827 (diff)
downloadpyramid-07e802fa7d6a63a69b31514923f85d6e76dd33e8.tar.gz
pyramid-07e802fa7d6a63a69b31514923f85d6e76dd33e8.tar.bz2
pyramid-07e802fa7d6a63a69b31514923f85d6e76dd33e8.zip
Changed 'host' and 'port' configuration to a new 'listen' style that is now supported by waitress server.
Diffstat (limited to 'docs/narr')
-rw-r--r--docs/narr/MyProject/development.ini3
-rw-r--r--docs/narr/MyProject/production.ini3
-rw-r--r--docs/narr/project.rst11
-rw-r--r--docs/narr/startup.rst4
4 files changed, 9 insertions, 12 deletions
diff --git a/docs/narr/MyProject/development.ini b/docs/narr/MyProject/development.ini
index 94fece8ce..42c514794 100644
--- a/docs/narr/MyProject/development.ini
+++ b/docs/narr/MyProject/development.ini
@@ -24,8 +24,7 @@ pyramid.includes =
[server:main]
use = egg:waitress#main
-host = 127.0.0.1
-port = 6543
+listen = 127.0.0.1:6543
###
# logging configuration
diff --git a/docs/narr/MyProject/production.ini b/docs/narr/MyProject/production.ini
index 1174b1cc7..3114b9d4d 100644
--- a/docs/narr/MyProject/production.ini
+++ b/docs/narr/MyProject/production.ini
@@ -18,8 +18,7 @@ pyramid.default_locale_name = en
[server:main]
use = egg:waitress#main
-host = 0.0.0.0
-port = 6543
+listen = 0.0.0.0:6543
###
# logging configuration
diff --git a/docs/narr/project.rst b/docs/narr/project.rst
index 6c42881f4..ec26b880e 100644
--- a/docs/narr/project.rst
+++ b/docs/narr/project.rst
@@ -295,16 +295,15 @@ Here's sample output from a run of ``pserve`` on UNIX:
Access is restricted such that only a browser running on the same machine as
Pyramid will be able to access your Pyramid application. However, if you want
to open access to other machines on the same network, then edit the
-``development.ini`` file, and replace the ``host`` value in the
-``[server:main]`` section, changing it from ``127.0.0.1`` to ``0.0.0.0``. For
+``development.ini`` file, and replace the ``listen`` value in the
+``[server:main]`` section, changing it from ``127.0.0.1:6543`` to ``0.0.0.0:6543``. For
example:
.. code-block:: ini
[server:main]
use = egg:waitress#main
- host = 0.0.0.0
- port = 6543
+ listen = 0.0.0.0:6543
Now when you use ``pserve`` to start the application, it will respond to
requests on *all* IP addresses possessed by your system, not just requests to
@@ -320,8 +319,8 @@ browser by visiting ``http://192.168.1.50:6543/``.
You can change the port on which the server runs on by changing the same
portion of the ``development.ini`` file. For example, you can change the
-``port = 6543`` line in the ``development.ini`` file's ``[server:main]``
-section to ``port = 8080`` to run the server on port 8080 instead of port 6543.
+``listen = 127.0.0.1:6543`` line in the ``development.ini`` file's ``[server:main]``
+section to ``listen = 127:0.0.1:8080`` to run the server on port 8080 instead of port 6543.
You can shut down a server started this way by pressing ``Ctrl-C`` (or
``Ctrl-Break`` on Windows).
diff --git a/docs/narr/startup.rst b/docs/narr/startup.rst
index 3e168eaea..b71cff57d 100644
--- a/docs/narr/startup.rst
+++ b/docs/narr/startup.rst
@@ -130,8 +130,8 @@ Here's a high-level time-ordered overview of what happens when you press
#. ``pserve`` starts the WSGI *server* defined within the ``[server:main]``
section. In our case, this is the Waitress server (``use =
- egg:waitress#main``), and it will listen on all interfaces (``host =
- 127.0.0.1``), on port number 6543 (``port = 6543``). The server code itself
+ egg:waitress#main``), and it will listen on all interfaces (``listen =
+ 127.0.0.1:6543``), on port number 6543. The server code itself
is what prints ``serving on http://127.0.0.1:6543``. The server serves the
application, and the application is running, waiting to receive requests.