Last active
August 16, 2021 09:50
-
-
Save devhero/bc0789e0ebcfcce457c3e59f5232389f to your computer and use it in GitHub Desktop.
flask tips
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from http://flask.pocoo.org/docs/1.0/cli/ | |
# 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: | |
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. | |
# .flaskenv example | |
LC_ALL=en_US.UTF-8 | |
LANG=en_US.UTF-8 | |
FLASK_APP=app_dev.py | |
FLASK_ENV=development | |
FLASK_RUN_HOST=localhost | |
FLASK_RUN_PORT=5050 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment