All notes
Heroku

Quick start

Installation

heroku.com: heroku-cli.


brew install heroku

heroku --version

heroku login

# To login with another username:
mv ~/.netrc ~/.netrc.backup
heroku login

Auto update

If a new version is found, it will be downloaded and stored in ~/.local/share/heroku/cli. This background check will happen at most once every 4 hours.

Uninstall


rm -rf /usr/local/heroku
rm -rf ~/.local/share/heroku ~/.config/heroku ~/.cache/heroku

Setup app

heroku.com: get started with nodejs.


cd ~/myapp
heroku create
# When you create an app, a git remote (called heroku) is also created and associated with your local git repository.

heroku config:set TIMES=2 TWITTER_KEY="aaa" TWITTER_SECRET="bbb"
heroku config

git push heroku master

# Ensure that at least one instance of the app is running:
heroku ps:scale web=1
# Check information on the current dyno container:
heroku ps

# Visit the URL by:
heroku open

# See the logs
heroku logs --tail

# Run Procfile web job locally:
heroku local web

Procfile

devCenter: procfile.

The web process type is special as it’s the only process type that will receive HTTP traffic from Heroku’s routers. Other process types can be named arbitrarily.