0

This is my code that I have added to the link of active home page while creating a new site.The Screen shot shows the default template

    <apex:page >
           <apex:includeLightning />
                <div id="lightning" />
                <script>
                $Lightning.use("c:CTD_TestApp", function() {
                    $Lightning.createComponent("c:CTD_LoginPage",
                                               {},
                                               "lightning",
                                               function(cmp) {
                                                   console.log("Component created!");
                                                   console.log(cmp);
                                               });
                });

       </script>
   </apex:page>

This is the App.

 <aura:application access="GLOBAL" extends="ltng:outApp" >
        <aura:dependency resource="c:LoginPage"/>
 </aura:application>

It shows my internal server error 500 on the app that is not loading. How can I resolve it?

1 Answer 1

0

Change the app code to : implements="ltng:allowGuestAccess" was missing.

<aura:application access="GLOBAL" extends="ltng:outApp" implements="ltng:allowGuestAccess">
    <aura:dependency resource="c:LoginPage"/>
</aura:application>

Follow this link to know more,

Exposing Lightning app on force.com sites

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .