Install Heroku CLI
For macOS
$ brew tap heroku / brew && brew install heroku
For Windows
$ wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh
Heroku Command
$ git add -A
$ git commit -m "initial commit"
$ git push heroku master
$ heroku run rails db:migrate
How to Login Heroku
$ heroku login -i (for windows)
$ heroku login (for Mac)
Create an app
$ heroku init (if you need)
$ heroku create OR heroku create sushi
Show logs
$ heroku logs
$ heroku logs -t # --tail (stream)
$ heroku logs -s app # --source (only on app logs)
Configuration
$ heroku config # List
$ heroku config -s # List in shell format
Restart
$ heroku restart
$ heroku pg:reset DATABASE
PostgreSQL
$ heroku addons:add heroku-postgresql (Start a database)
Applications
$ heroku apps # list
$ heroku apps:create [NAME]
$ heroku apps:destroy --app APPNAME
$ heroku apps:info
$ heroku apps:open # open in browser
$ heroku apps:rename NEWNAME