For whatever reason, I’ve been slow to embrace Heroku. Its charms are growing on me, though. For a project I made for an online course, creating a PostgreSQL database at Heroku was required. These are the instructions, and they worked perfectly.
- Navigate to Heroku, and create an account if you don’t already have one.
- On Heroku’s Dashboard, click “New” and choose “Create new app.”
- Give your app a name,* and click “Create app.”
- On your app’s “Overview” page, click the “Configure Add-ons” button.
- In the “Add-ons” section of the page, type in and select “Heroku Postgres.”
- Choose the “Hobby Dev – Free” plan, which will give you access to a free PostgreSQL database that will support up to 10,000 rows of data. Click “Provision.”
- Now, click the “Heroku Postgres :: Database” link.
- You should now be on your database’s overview page. Click on “Settings”, and then “View Credentials.” This is the information you’ll need to log into your database.
* This app name will appear in the URL if later you deploy an online app using this database. So do not name it something generic like “database1.” If your app is about cities in Europe, for example, name it europe-cities. A hyphen is fine. Do not use spaces or other marks of punctuation.
Now, how will you use that database? That will be the topic of a future post. Stay tuned.