You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.
Running the below code with Flask 0.10.1 and Flask-Script 2.0.5 will result in a server starting at port 5000, though the app is explicitly configured to use port 8888. To the end user, the SERVER_NAME configuration value appears to be ignored.
I'm not sure if this behavior merits changing. However, I think it should be documented, since it is confuses the end user when certain configuration values (e.g. SERVER_NAME) appear to be ignored.
The text was updated successfully, but these errors were encountered:
This seems to have been fixed at some point, although Flask requires SERVER_NAME to be a string, setting it to an int throws an exception in Flask, setting it without a host makes it be ignored.
with default values for host, port, etc... This overrides all the normal flask configuration environment variables, which is pretty frustrating to work around.
In case anyone else lands on this, I've found a workaround that works in the specific case of SERVER_NAME, which is simply to make my own runserver command that goes back to providing Nones for host= and port= like so:
Running the below code with Flask 0.10.1 and Flask-Script 2.0.5 will result in a server starting at port 5000, though the app is explicitly configured to use port 8888. To the end user, the
SERVER_NAME
configuration value appears to be ignored.As of 0.10, Flask parses
SERVER_NAME
to set the host and port, falling to defaults if not set. (https://github.com/mitsuhiko/flask/blob/master/flask/app.py#L823)Server
command sets its own defaults (https://github.com/smurfix/flask-script/blob/master/flask_script/commands.py#L339) and initializes app with them (https://github.com/smurfix/flask-script/blob/master/flask_script/commands.py#L417), so the end result is an app that has all configuration settings, but some are not applied.I'm not sure if this behavior merits changing. However, I think it should be documented, since it is confuses the end user when certain configuration values (e.g.
SERVER_NAME
) appear to be ignored.The text was updated successfully, but these errors were encountered: