forked from orbit-oss/flask
parent
324b4ea255
commit
93698b509b
1 changed files with 18 additions and 0 deletions
18
docs/cli.rst
18
docs/cli.rst
|
|
@ -183,6 +183,24 @@ production, you should call :func:`~cli.load_dotenv` manually.
|
||||||
.. _python-dotenv: https://github.com/theskumar/python-dotenv#readme
|
.. _python-dotenv: https://github.com/theskumar/python-dotenv#readme
|
||||||
|
|
||||||
|
|
||||||
|
Setting Command Options
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Click is configured to load default values for command options from
|
||||||
|
environment variables. The variables use the pattern
|
||||||
|
``FLASK_COMMAND_OPTION``. For example, to set the port for the run
|
||||||
|
command, instead of ``flask run --port 8000``:
|
||||||
|
|
||||||
|
.. code-block:: none
|
||||||
|
|
||||||
|
export FLASK_RUN_PORT=8000
|
||||||
|
flask run
|
||||||
|
* Running on http://127.0.0.1:8000/
|
||||||
|
|
||||||
|
These can be added to the ``.flaskenv`` file just like ``FLASK_APP`` to
|
||||||
|
control default command options.
|
||||||
|
|
||||||
|
|
||||||
Environment Variables From virtualenv
|
Environment Variables From virtualenv
|
||||||
-------------------------------------
|
-------------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue