Skip to content

Commit

Permalink
Refactor get_config function in config.py to use a default value for …
Browse files Browse the repository at this point in the history
…FLASK_ENV environment variable
  • Loading branch information
yassine20011 committed Apr 10, 2024
1 parent 805de97 commit 31d375d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,5 @@ class ProductionConfig(BaseConfig):
)

def get_config():
flask_env = os.environ.get('FLASK_ENV')
# default to development
print(" * FLASK_ENV: " + flask_env)
flask_env = os.environ.get('FLASK_ENV', 'development')
return config.get(flask_env)

0 comments on commit 31d375d

Please sign in to comment.