Skip to content

How to use 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.

Notifications You must be signed in to change notification settings

JitendraZaa/Lightning-Out-Demo

Repository files navigation

Lightning-Out-Demo

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.

Jitendra Zaa Blog

Click here for Youtube Video demo

Blog post explaining code

Steps to run

Step 1

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>

Step 2

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.

Step 3

Save https://localhost:8081 in CORS setting of Salesforce.

Step 4

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

Step 5

Navigate to https://localhost:8081/ in your browser and you would see Lightning Out in Action

About

How to use 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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published