Skip to content

Commit 22579b1

Browse files
committed
Added PostgreSQL Environment variable
1 parent ddcc82d commit 22579b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import os
2+
13
from flask import Flask
24
from flask_restful import Api
35
from flask_jwt import JWT
@@ -8,7 +10,7 @@
810
from resources.store import Store, StoreList
911

1012
app = Flask(__name__)
11-
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///data.db'
13+
app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URL','sqlite:///data.db')
1214
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = False
1315
app.config['PROPAGATE_EXCEPTIONS'] = True
1416
app.secret_key = 'vijay'

0 commit comments

Comments
 (0)