Overriding integration url based on environment

Hi! I read the doc about multiple environments using Plasmic Studio but I didn’t understand how can integration urls be overriden. I’m using the Cloud version of Studio and I want to be able to start the app locally, pointing it’s integrations to my local backend in the Loader mode.

Let’s say for integration called “backend” I want the url be https://prod.myservice.com, and for the local development it should be http://127.0.0.1:3000.

How can it be achieved?

Hi Art, great question. We recommend making a copy of the project for development purposes. See the considerations section for rationale.

Thank you, @jason! To be honest, I read it like 5 times before I understood that it looks like the flow I’m used to as a developer with multiple deployed versions (prod/staging/qa/dev) seems to be impossible to achieve with the proposed set up. I may still be not understanding it though.

I understood how we can use different versions of the same project using tags - that’s clever!

However, I’d like the dev version to call dev server, so the data mutation doesn’t happen in the prod database when I play with a new build. Or even old one. And making a copy of a project for every change to point it to dev doesn’t seem like a viable solution. It’s especially needed if I wanted, let’s say, a QA engineer to look at what I’ve got.

It would be great if there would be a way to add an interceptor or something like this in my codebase using the Loader mode, so the api base url could be overriden depending on some build time environment variable.

If you have an idea of how can it be achieved, that would be great.

I see what you’re trying to do with isolated environments for dev/staging/etc, which makes a lot of sense. Unfortunately we don’t currently support this at the moment, so the manual workflow is the best we can do at the moment.

We’ll take this feedback and figure out how to improve in the future. I think there’s a way we can build this into our branching feature (Enterprise plan only at the moment), but it’s not something we can do soon.