Environment variables for staging and production (Scale plan)

I’m currently on the Scale plan for my WeWeb project and I’d like to know if it’s possible to define different values for environment variables depending on the deployment environment (staging vs production).

My use case is to connect the frontend to two separate backends, for example:

  • Staging API URLhttps://staging.api.mysite.com

  • Production API URLhttps://api.mysite.com

Does WeWeb support managing environment variables per deployment environment?
If so, what’s the recommended best practice to configure them and use them in workflows or data sources?

If you use Xano, it is straightforward. You just need to define the branch and data source for editor, staging and prod.

If you have some other backend, you can concatenate the url using variable

{{url}}/xyz_api

Change the url variable on app load based on the environment.