-
Notifications
You must be signed in to change notification settings - Fork 27
Home
Complete source code to showcase using Lightning component in node.js (External websites) by using Lightning Out. It shows how to enable CORS and SSL in Node.js with Video and complete source code.
Click here for Youtube Video demo
Create below Lightning application in your Salesforce instance and name it as LightningOutDemo
<aura:application access="Global" extends="ltng:outApp">
<aura:dependency resource="forceChatter:feed" type="COMPONENT" />
</aura:application>
Create Connected App in your Salesforce instance with callback URL - https://localhost:8081/
Copy consumer secret created in connected app and update clientId variable defined in OAuth.js file.
Save https://localhost:8081
in CORS setting of Salesforce.
Run npm install command in the directory where this code is downloaded. It will download all the required node modules then run npm start, it will start the server
Navigate to https://localhost:8081/
in your browser and you would see Lightning Out in Action