Skip to content

Instantly share code, notes, and snippets.

@simplesNotEZ
Last active August 7, 2018 20:56
Show Gist options
  • Select an option

  • Save simplesNotEZ/df766d7788763f60be8f69b1e341e8fe to your computer and use it in GitHub Desktop.

Select an option

Save simplesNotEZ/df766d7788763f60be8f69b1e341e8fe to your computer and use it in GitHub Desktop.
Heroku Deployment Cheatsheet

Make sure you have created a github repo for your project. Stage, commit, and push your files and changes to this github repo first. Then, from within the project directory:

  1. $ heroku login //put in your credentials to log-in to heroku

  2. $ heroku create (app_name) //this should automatically set-up a remote on heroku to push to

  3. $ heroku addons:create heroku-postgresql:hobby-dev //this is required when deploying to heroku with a database

  4. $ git remote -v //confirms that you have a heroku remote available

  5. $ git push heroku master //push all your code/files up to heroku

  6. $ heroku run knex migrate:latest //now that your migration and seed files are all up on heroku, you can run your migration and seeds to build out your database

  7. $ heroku run knex seed:run

  8. Go into your heroku account through the brower. Find the project/app that you just set up. Click on "Open App".
    The url in the browser window is your url to your root route.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment