I have been tasked with migrating an R Shiny App to Web AppBuilder and the data for the app is located on an SQL server and is currently being accessed through a open source api.
Question one is: do I need to locate the application on the same server that the api is located on in order to prevent a cross-origin domain error? I ask because this is exactly what happened when trying to make a ajax request from a different domain than that of the api.
Question two is: Which is the best route to go for this? Continue to use the third party api to connect to the data, or create views to the database tables in ArcMap and publish a new REST service. It seems there are advantages and disadvantages to both. My thinking is that creating the new REST service, while being a little more work at first, would save time and effort in the long run because there would be a lot less custom coding querying the data ( I should be able to use out-of-the-box widgets). Unless I am wrong, If