Configure the Heroku Environment Variables
Now that we’ve created the canvas app, we need to
set up an environment variable for the consumer secret.
- From Setup, click .
- In the Connected Apps related list, click Shipify.
- Next to the Consumer Secret field,
click the link Click to reveal.

- Copy the consumer secret.
-
Open a command window, navigate to the Shipify-Node-App directory, and enter this command to create the environment variable: heroku config:add APP_SECRET='Your_Consumer_Secret'If you’re working from a Windows computer, you may need to replace the single quotes with double quotes (").
-
Enter this command: heroku
config:add RUNNING_ON_HEROKU='true'This specifies that the application is running on Heroku. This is helpful for testing so you don’t need to re-deploy every time you make a change. If you’re working from a Windows computer, you may need to replace the single quotes with double quotes (").
-
Enter this command to deploy the app to Heroku: git push heroku masterIf the process completes successfully, you’ll see something like this:
If you receive a “permission denied” error message, you may need to set up your SSH key and add it to Heroku. See https://devcenter.heroku.com/articles/keys.
You can quickly test that the canvas app is working in the full Salesforce site by clicking the Chatter tab. Click the Shipify link on the left, and you’ll see the Heroku application appear right in Salesforce and display a list of open orders, including the one you created in the previous chapter. Now we’ll add the canvas custom action to the publisher layout so our users can see it.