Files
deb-python-pecan/docs/source/reload.rst
Ryan Petrello 087ea4f699 Improve pecan documentation and correct intersphinx references.
Change-Id: Iac6229a2727a3c662d3fe9e83e1aa02ef648f025
2014-01-19 17:49:11 -05:00

29 lines
865 B
ReStructuredText

:orphan:
#reload
Reloading Automatically as Files Change
---------------------------------------
Pausing to restart your development server as you work can be interruptive, so
:command:`pecan serve` provides a ``--reload`` flag to make life easier.
To provide this functionality, Pecan makes use of the Python
`watchdog <https://pypi.python.org/pypi/watchdog>`_ library. You'll need to
install it for development use before continuing::
$ pip install watchdog
Downloading/unpacking watchdog
...
Successfully installed watchdog
::
$ pecan serve --reload config.py
Monitoring for changes...
Starting server in PID 000.
serving on 0.0.0.0:8080, view at http://127.0.0.1:8080
As you work, Pecan will listen for any file or directory modification
events in your project and silently restart your server process in the
background.