8. Working with Heroku - WebJamApps/JaMmusic GitHub Wiki

Heroku is a cloud platform based on a managed container system, with integrated data services and a powerful ecosystem, for deploying and running modern apps. The Heroku developer experience is an app-centric approach for software delivery, integrated with today’s most popular developer tools and workflows.

8.1 Heroku Web Interface

Overview tab: displays latest activity
Activity tab: displays the activity feed: Build in progress, Build succeeded, Build failed, Deployed
Settings tab:
    Config Variables: configure / view the Environment variables
    Domains and certificates: add the domain

8.2 Heroku Command Line Interface (CLI)

8.2.1 Installation

From your VM and Ubuntu Terminal, type sudo apt-get install heroku
Verify installation, type heroku --version

8.2.2 Login

From a Terminal, type heroku login

    enter your Heroku credentials
        email
        password (typing will be hidden)

8.2.3 View apps

To see your Heroku apps, type heroku apps --all

8.2.4 View logs

When troubleshooting a failed build, it is often necessary to view the logs. To view the Heroku logs for a specific app, type heroku logs --app {AppName}

8.2.5 Configure app settings

For both dev and prod apps, to set the rebuild of node modules on deploy without any cache:

type heroku config:set NODE_MODULES_CACHE=false --app {app name}

The NODE_ENV environment variable is set to “production” by default.

To set the node environment to “development” (for dev app only):
type heroku config:set NODE_ENV=development --app {app name}