How to connect different environments in Cube Cloud

You can set up branches in your Cube Cloud instance, for example for ‘dev’, and ‘prod’. Then when you connect your Cube Cloud instance to Embeddable you can define which branch to use.

If you have separate Cube instances with their own CUBE_JS_API_SECRETs then we have a workaround, which is to set up 2 workspaces, each connected to a separate instance.

If you want to test two different Cube endpoints locally, you can run embeddable:dev like so:
CUBE_CLOUD_ENDPOINT=some_url npm run embeddable:dev

In this case, you can point at any endpoint (unlike the production workspace, where it’s only linked to one fixed endpoint).

Alternatively, you can add CUBE_CLOUD_ENDPOINT to a .env file