In this assignment, you'll deploy your database-driven application to Heroku.
First, complete the following pre-deployment steps.
- Create a Heroku app called
USERNAME-galvanize-bookshelf
whereUSERNAME
is your GitHub username in lowercase form. - Generate a cryptographic key for the JWT signature and set it to the
JWT_KEY
config variable of the new Heroku app. - Update the
package.json
file with a dependency to a specific Node.js version. - Enable the Heroku PostgreSQL add-on for the new Heroku app.
- Update the
knexfile.js
file with theproduction
database connection information. - Update the
package.json
file with aheroku-postbuild
script to migrate the production database. - Add and commit the changes to your local git repository.
- Push the changes to the
master
branch on GitHub.
Next, complete the following deployment steps.
- Push the changes to the
master
branch on Heroku. - Seed the production database with
npm run knex seeds:run
as a one-off Heroku command. - Visit the Heroku app at
https://USERNAME-galvanize-bookshelf.herokuapp.com/
. - If the application isn't working, check the production logs with
heroku logs
. - Otherwise, celebrate with a beverage of choice!
Finally, complete the following post-deployment steps.
- Add
https://USERNAME-galvanize-bookshelf.herokuapp.com/
to your Github repository's URL. - Fix any test errors, including bonus tests, with
npm test
. - Fix any linting errors with
npm run lint .
. - Submit your solution for grading.
Use the Heroku Scheduler add-on to seed the production database with npm run knex seeds:run
every hour.
Once you're satisfied, find a classmate and see if that person would like some help.