Text 6 Nov 4 notes How to add a free shared PostgreSQL db to your python app running on Heroku

Heroku’s documentation claims that “New apps created on Heroku automatically have a shared database installed.” Unfortunately, that isn’t at all true for Flask apps: if you create a new Flask app on Heroku, you don’t have any database at all by default.

I spent a couple of hours Googling and digging through documentation to try to figure out how to get a database for my app to use, and was finally helped out by user lukemelia in #heroku. If you find yourself in the position I was in, here’s all you need to do:

(moody) [jrheard@jrheard:~/envs/moody] (master) $ heroku addons:add shared-database:5mb
-----> Adding shared-database:5mb to moody... done, v11 (free)

Problem solved.

  1. edi-rice reblogged this from jrheard
  2. zonble reblogged this from jrheard
  3. jrheard posted this

Design crafted by Prashanth Kamalakanthan. Powered by Tumblr.