forked from orbit-oss/flask
Fix #2897 - Add extra_files option to flask run CLI
This commit is contained in:
parent
4fe81d7c62
commit
2308cba407
3 changed files with 23 additions and 2 deletions
14
docs/cli.rst
14
docs/cli.rst
|
|
@ -202,6 +202,20 @@ command, instead of ``flask run --port 8000``:
|
|||
These can be added to the ``.flaskenv`` file just like ``FLASK_APP`` to
|
||||
control default command options.
|
||||
|
||||
To define a list of files the reloader should watch additionally to the modules
|
||||
as in ``extra_files`` argument used in the ``app.run`` and ``werkzeug.serving.run_simple``
|
||||
you can either use the ``--extra-files`` (or multiple ``-f``) option or define the
|
||||
``FLASK_RUN_EXTRA_FILES`` environment variable.
|
||||
|
||||
.. code-block:: none
|
||||
|
||||
# on windows use ``;`` instead of ``:`` to separate paths
|
||||
export FLASK_RUN_EXTRA_FILES=/path/to/file1:/path/to/file2
|
||||
flask run
|
||||
* Running on http://127.0.0.1:8000/
|
||||
* Detected change in '/path/to/file1', reloading
|
||||
|
||||
On command line the same can be achieved with ``flask run -f /path/to/file1 -f /path/to/file2``.
|
||||
|
||||
Disable dotenv
|
||||
~~~~~~~~~~~~~~
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue