Skip to content

Commit

Permalink
Updated docs for external server information.
Browse files Browse the repository at this point in the history
This fixes #14.
  • Loading branch information
mitsuhiko committed Apr 24, 2010
1 parent a862ead commit ef34638
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 9 deletions.
18 changes: 18 additions & 0 deletions docs/quickstart.rst
Expand Up @@ -54,6 +54,24 @@ So what did that code do?

To stop the server, hit control-C.

.. _public-server:

.. admonition:: Externally Visible Server

If you run the server you will notice that the server is only available
from your own computer, not from any other in the network. This is the
default because in debugging mode a user of the application can execute
arbitrary Python code on your computer. If you have `debug` disabled
or trust the users on your network, you can make the server publicly
available.

Just change the call of the :meth:`~flask.Flask.run` method to look
like this::

app.run(host='0.0.0.0')

This tells your operating system to listen on a public IP.


Debug Mode
----------
Expand Down
13 changes: 4 additions & 9 deletions docs/tutorial/setup.rst
Expand Up @@ -57,13 +57,8 @@ without problems. When you head over to the server you will get an 404
page not found error because we don't have any views yet. But we will
focus on that a little later. First we should get the database working.

.. admonition:: Troubleshooting
.. admonition:: Externally Visible Server

If you notice later that the browser cannot connect to the server
during development, you might want to try this line instead::

app.run(host='127.0.0.1')

In a nutshell: Werkzeug starts up as IPv6 on many operating systems by
default and not every browser is happy with that. This forces IPv4
usage.
Want your server to be publically available? Check out the
:ref:`externally visible server <public-server>` section for more
information.

0 comments on commit ef34638

Please sign in to comment.