Creating a connected application 

The first step is to make sure the Node.js app can authenticate with Salesforce and obtain the access token that the Lightning Out application will need. In order to do this, we will create a connected application in Salesforce that will allow the Node.js application to go through the OAuth flow.

Prior to creating a connected application, we will need to create a Heroku application. Use the following commands to create a new Heroku app. Let's make a local directory for this application and name it ltngOutApp:

$ mkdir ltngOutApp  // Make a directory named ltngOutApp$ cd ltngOutApp // cd into the directory$ git init // Initialize the Git repository$ heroku apps:create ltngOutApp // Create a Heroku application ...

Get Learning Salesforce Lightning Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.