function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Daniel FullerDaniel Fuller 

How do you launch a standalone Lightning app from a Salesforce Org?

Hello everyone,
I have a question in an area where I am stuck after creating a new stand-alone Lightning app. I do not want to run the Lightning app on the Salesforce1 platform but want to run it on a desktop platform from within the Salesforce org. What process does one have to go through to set up a stand alone Lightning App to be launched from within the Salesforce org? Is there a way to link Salesforce tabs to the Lightning App that will launch the app when they are clicked like you can with Visualforce pages or to add the Lightning App in the Apps menu? I am not able to find any documentation or how to use desktop Lightning Apps from within Salesforce or if that is possible at this time.
Best Answer chosen by Daniel Fuller
Daniel FullerDaniel Fuller
Hey guys,

Thank you for the comments. Along the lines with what @cdylancarter mentioned, I have discovered a few ways to do this now that I wanted to share to this post for others.

1.) You can create a Web Tab and add the hard-coded URL for the Lighting App using the syntax cdylancarter mentioned as the URL. This will open the Lightning App inside of your Salesforce environment; therefore, you will still have the sidebar, header, standard stylesheets, etc.

2.) The more preferable way I have found is to create a Connected App in the Salesforce environment and specify the Lightning App URL as the "Start URL". You can then add the App to the App Launcher and it will appear in your normal app dropdown menu so that you can launch the app directly from there.

All Answers

SonamSonam (Salesforce Developers) 
Hi Daniel, Currently you will have to launch the Lightning App from within Salesforce1 as these can't be launched as standalone apps for now.
cdylancartercdylancarter
Actually, you totally can launch it in the browser for logged in users. The URL pattern is https://instance.lightning.force.com/[namespace]/[app_name].app. You can create a custom link to that address for your app.

(And yes, this does mean that salesforce1, which you can find at one/one.app is a Lightning app!)
Daniel FullerDaniel Fuller
Hey guys,

Thank you for the comments. Along the lines with what @cdylancarter mentioned, I have discovered a few ways to do this now that I wanted to share to this post for others.

1.) You can create a Web Tab and add the hard-coded URL for the Lighting App using the syntax cdylancarter mentioned as the URL. This will open the Lightning App inside of your Salesforce environment; therefore, you will still have the sidebar, header, standard stylesheets, etc.

2.) The more preferable way I have found is to create a Connected App in the Salesforce environment and specify the Lightning App URL as the "Start URL". You can then add the App to the App Launcher and it will appear in your normal app dropdown menu so that you can launch the app directly from there.
This was selected as the best answer
Ken KoellnerKen Koellner
Can you describe the exact syntax for "instance".  Can that be a sandbox?  Should it be something like "sb2.cs42" or "cs42"?  I couldn't get either of those to work.

I tried -- https://cs42.salesforce.com.lightning.force.com/hmhco/KKTestApp1.app

I don't get an error but it hangs.  My guess is the URL may be correct but it doesn't work in sandboxes.  ('hmhco' is our domain.)

I tried -- https://sb2.cs42.salesforce.com.lightning.force.com/hmhco/KKTestApp1.app

And I get a server not found error.
 
Dave AlvaroDave Alvaro
@Ken Koellner - if hmhco is you custom domain, try https://hmhco.lightning.force.com/<lightningNamespace>/KKTestApp1.app

<lightningNamespace is the namespace your app resides in (default is "c").  HTH
Santhosh SasidharanSanthosh Sasidharan

@Dave Alvaro:

Would like to display my custom lighning app(name = customlightningapp), to be loaded inside a community.
the url "https://communitydomain/name/c/appname " is working but some events and libraries are not working as it is not in one/one.app context

How can I modify the url to include the libraries I want, guessing that the url after modification will look something like
"communitydomain/name/one/one.app/appname" 
Appreciate any help

HexagonHexagon
Creating a direct web tab is not working anymore. Another solution is to create a visualforce page and open the url of the /c/app.app onload of the page. Just make sure you are not in view state or dev mode. And then use the vf page to create a webtab.