As I'm building various app's in Web AppBuilder (DE) and deploying them on our web server (Web Adaptor machine), I notice that some of them require a tweak in env.js where no apiUrl is set. In my case, adding the line below has always worked.
apiUrl = 'http://js.arcgis.com/3.31/',
But I'm not sure how env.js file is generated or updated by WAB throughout development. My suspicion is that as you add custom developed widget (either home grown or sources elsewhere), the need for this arises whereas something straight out of WAB doesn't need this? Can anyone shine some light on this for me?
Solved! Go to Solution.
This line exists but is commented out while the app is accessed through the WEB DE page. When you download the app, one of the things that the process does is uncomment that line. How are you deploying your apps? Are you using the download button or just copying the files from the server directory?
Arne,
The apiUrl gets set by WAB Dev in the NodeJS code. this is not something that you would normally have to manipulate unless you are wanting to use a api version that is different from the one that your current WAB Dev was designed for.
This line exists but is commented out while the app is accessed through the WEB DE page. When you download the app, one of the things that the process does is uncomment that line. How are you deploying your apps? Are you using the download button or just copying the files from the server directory?
Ken, that must be it. Because I've done both - the export/zip from within WAB and then just straight folder zip and copy/paste. Didn't realize there was this going on behind the scenes. Great information. I'm trying to formulate some development best practices for our team as it pertains to WAB, and this needs to go in there.