Skip to content

Instantly share code, notes, and snippets.

@NeniEmSu
Forked from w3cj/heroku_cheat_sheet.md
Last active October 8, 2020 20:00
Show Gist options
  • Save NeniEmSu/08bba74340560c6d6a3aadf316046175 to your computer and use it in GitHub Desktop.
Save NeniEmSu/08bba74340560c6d6a3aadf316046175 to your computer and use it in GitHub Desktop.

Heroku Cheet Sheet

heroku login # login once
heroku create [name] # Initializes heroku app and adds remote.
heroku addons:create heroku-postgresql:[plane-name] -app [project-name] # add a postgres db addon to your heroku app where plane-name = hobby-dev
heroku logs [--tail] # Shows heroku server terminal
heroku pg:psql # connect to heroku addon database server
heroku config # shows heroku environment variables
  - heroku config:set clown=fiesta # set a config variable
git push heroku master # deploy latest code to heroku
heroku open # open heroku url in browser
heroku run knex migrate:latest # run migrations on production db
heroku run knex seed:run  # run seeds on production db
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment