Environments And Channels

Experro provides multiple channels within a workspace, meaning you can create several channels in a single workspace. When a new workspace is created, a default channel is automatically set up along with a default language, which is “English-United States” with the language code “en-us.” Experro also provides multiple development environments across all channels. By default, Experro provides two environments:
  1. Development
  2. Production.

How to change Environment For Local Development

Why?

When developing a theme, it’s crucial to avoid working directly on the production environment, as it can lead to issues with the live site. Instead, it’s best to use a development environment for creating and testing new features. This practice ensures that any changes or developments do not affect the live site and helps maintain the stability of the production environment.
To change the environment for local development, follow these steps:
  1. Check Your .env File: Locate the .env file, which contains a variable named STORE_URL. This variable will have a value like <store-hash>-en-us.experro.app.
  2. Update the STORE_URL Variable: Modify the value of the STORE_URL variable to switch between different environments. Set it to the appropriate environment URL for your needs.
  3. Restart the experro-cli server: After updating the STORE_URL variable, restart the Experro CLI server to apply the changes.
This will configure your local development environment according to the selected environment.

STORE URL

You can obtain the store URLs from the Channel Settings. For guidance on how to access this information, refer to the Channel Information document. In the Channel Settings, you will find the list of languages, as shown in the image below. store-ulrs.png In the Language URLs, you will see multiple store URLs labeled by environment. These labels indicate which URL corresponds to which environment. You can take the URL and set it as the value for the STORE_URL variable, removing https:// from the URL. Here are examples based on the image: When pointing to the production environment for local development, the STORE_URL would look like this:
STORE_URL=c7kv7eyu-us-en.experro-dev.app
When pointing to the development environment, it would be:
STORE_URL=c7kv7eyu-us-en-dev.experro-dev.app
After making this change, restart the experro-cli server. This will successfully change the environment for local development.