DATABASE_URLon all dynos that tells your system where to find the database and how to connect to it. This happens by default, no additional action required.
index.jsto access the
DATABASE_URLenv var from Heroku. We still need to connect to our local Postgres when running our app locally, so we'll use a condition to see if the
DATABASE_URLenv var is set.
init_tables.sqlon the Heroku Postgres DB. The
<operator pipes content from the file on the right into the command on the left.
seed.sqlon the Heroku PG DB.
bashand click Run Console to open up a console window running Bash for your server.
npx sequelize-cli db:migrateand
npx sequelize-cli db:seed:allin the console to execute migrations and seeds for your app.
console.logoutput in Heroku's logs to diagnose errors.