diff --git a/README.md b/README.md index 510b356..77563c2 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,6 @@ git clone pip install -r requirements.txt ``` -Add `DATABASE_URL = sqlite:///local.db` in your environment variables. - Go to project root folder and execute `python3 main.py`. Go to `https://localhost:5000/ to see the site diff --git a/config.py b/config.py index 8d094b7..d671a19 100644 --- a/config.py +++ b/config.py @@ -1,4 +1,7 @@ import os + +basedir = os.path.abspath(os.path.dirname(__file__)) + class DevelopmentConfig: SQLALCHEMY_TRACK_MODIFICATIONS = False - SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') \ No newline at end of file + SQLALCHEMY_DATABASE_URI = os.environ.get('DATABASE_URL') or 'sqlite:///' + os.path.join(basedir, 'local.db') \ No newline at end of file