I am writing a worklight application and it will be connecting to a variety of backend services which will be decided by the consumer after installation. I would like to use adapters to connect the client to the backend services - but want to avoid editting and updating the adapter for each connecting user.
Essentially each customer has a running server I want to connect to - however it will be running on a different port and domain for each customer. I want them to be able to pass those to the adapter to allow a common call to be issued to the customer's backend server.
Is there a way that I can alter the domain and port I set in the adapter's xml file programmatically inside the adapter's javascript for each procedure so the user can tell the server where to issue a request to?
If there is no way to do this - would you recommend connecting directly to the backend and avoiding the use of worklight adapters?
Many thanks,
Andy