I currently have 3 scenarios for how my app will run: 1) Start in Desktop 2) www.mywebsiteproduction.com and 3) www.mywebsitetest.com. The 1st and 3rd will use the same ajax test server, while production will have a separate api URL for separate databases.
I’ll know which of the 3 scenarios by using window.location.host property. If it’s 126.96.36.199, then it’s start in browser. Otherwise, it’s one of the two host domains. If it’s anything else, well who cares - crash and burn.
In the case of the Start in Desktop, the host is not the correct api URL. It should be the test domain (api.mywebsitetest.com). And I don’t want to hard code the test domain URL into the app. I’ll forget about that and post something stupid to that test domain, and … regrets will begin when someone crawls into my public app and gets the URL…
Is there a way to include an additional js file only in the Start in Desktop deployment that can be accessed by main() when main() recognizes the localhost. EG, can I add a file to the deployment folder for start in desktop, but not put it in extra files. Or can I drop a file into the project properties and then manually remove it from the extrafiles?