diff --git a/.gitignore b/.gitignore index 90f4cd8..54b8c1b 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ quotes.db +settings.cfg diff --git a/backend/app.py b/backend/app.py index 385b9c4..fb1dfc6 100644 --- a/backend/app.py +++ b/backend/app.py @@ -1,5 +1,3 @@ -import os - import flask import flask_cors import flask_login @@ -11,11 +9,8 @@ import itsdangerous import sqlalchemy -DB_PATH = os.path.expandvars('$HOME/quotes/quotes.db') - app = flask.Flask(__name__) -app.config['SQLALCHEMY_DATABASE_URI'] = f'sqlite:///{DB_PATH}' -app.config['ERROR_404_HELP'] = False +app.config.from_envvar('SETTINGS') db = flask_sqlalchemy.SQLAlchemy(app) db.create_all()