Lightning Out in a Node.js application
In this section, we will build a Node.js web application that will be hosted on Heroku and renders the YouTube search component we have built using Lightning Out.
This section assumes you are familiar with webpack fundamentals, ES6 syntax for JavaScript, and Node.js fundamentals. This section also assumes you have the Heroku CLI installed from https://devcenter.heroku.com/articles/heroku-cli.
The application consists of the Lightning Out application, which we covered in the previous section. You can use SFDX to deploy the application to the scratch Org from the repository at https://github.com/PacktPublishing/Learning-Salesforce-Lightning-Application-Development/tree/master/chapter10/force-app/main/default.
You can create a scratch Org and push the code using the following commands. This assumes you have authenticated to the DevHub
using the Salesforce DX CLI:
$sfdx force:org:create -s -f config/project-scratch-def.json -a testOrg //This creates scratch...