Better dev environment support

I’m working on setting up authentication, and after seeing that I can’t add a formula to the input URLs, I’ve finally created an account here to discuss some difficulties surrounding doing development with WeWeb.

(note, I can only add one image per post for some reason, so you can see a fully-rendered version on hackmd https://hackmd.io/@AngelOnFira/SyR_lMgd0)

I’m working to create a backend and frontend in tandum. For this, the url I use for all REST API calls will change between the version I’m building, and the version I’ll deploy. Further, every time I boot up the backend to work on it, I get a new link for the backend since I’m using loophole.cloud. So, I found a way to handle this, where I created a variable that everything else can reference:

(image 2, see hackmd doc)

This works quite nicely for rest endpoints as the “base url”:

(image 3, see hackmd doc)

Presumably, when I’m ready to deploy my project, I’ll just override that variable to my production backend endpoint.

However, the auth plugin doesn’t let me use this variable, and I’ll need to change the endpoint it uses every time. This suggests to me that the path I’ve taken isn’t what’s recommended, or that I’m doing development incorrectly, and there’s a better “happy path” to go about this.

Any thoughts appreciated!

You could always use a workaround, this has already been discussed, so the team knows about it. This might help to “hack” around this:

[Supabase] Switch between Production and Staging in one click