Skip to content

Commit

Permalink
added Procfile
Browse files Browse the repository at this point in the history
  • Loading branch information
hinedy committed Oct 20, 2022
1 parent 735ed44 commit c03eecb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions Procfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
web: gunicorn app:app
7 changes: 5 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@
app.config["SESSION_TYPE"] = "filesystem"
Session(app)

# Configure CS50 Library to use SQLite database
db = SQL("sqlite:///finance.db")
# Configure CS50 Library to use PostgreSQL database
uri = os.getenv("DATABASE_URL")
if uri.startswith("postgres://"):
uri = uri.replace("postgres://", "postgresql://")
db = SQL(uri)

# Make sure API key is set
if not os.environ.get("API_KEY"):
Expand Down

0 comments on commit c03eecb

Please sign in to comment.