How do you change serverconnect URLs in mobile project when moving from local to remote server?

When developing my mobile app all of the server connects have URLs that point to http://localhost:8100. How do I switch all of them to the remote server URL?

image

Not sure what the expectation is of a standard “wappler way”, but I manage this through a dmx-bind:url. This way you can have builds pointing to different targets (dev/staging/prod).

<dmx-serverconnect credentials="" id="current_member_seen" url="https://staging.mealproapp.io/api/1/3/members/current_member_seen" site="Meal Planner Pro" dmx-bind:url="base_url.value + api_path.value + '/members/current_member_seen'" noload></dmx-serverconnect>

If you are not versioning your api, then you can skip over the api_path.value and just use a base_url variable that sets the domain. That way, you can change the domain in one place and all server connect apis/forms will get that domain.

1 Like

Are the variables only on the index page?

Yes.