Environments Configuration
Overview
The Environments tab of the application configuration lets you define and manage the deployment environments for your application — for example, development, staging, and production. Each environment can have its own set of properties, allowing you to configure environment-specific values such as API base URLs or feature flags that your application reads at runtime.
For full documentation on deploying to environments, see Deployment Environments.
What You Will Learn
- What deployment environments are and how they work in Bellini
- How to add, configure, and remove application environments
- How to define environment-specific properties and access them at runtime using the
$envservice
When To Use This
Use this tab when:
- You need to configure properties that differ between environments (e.g. an API base URL that is different in staging vs production).
- You want to switch which environment is active during development and preview.
- You need to add or remove a deployment environment.
Navigating Application Environments
Environments are displayed as tabs across the top of the Environments configuration panel. Each tab is named after its environment. Click a tab to view and edit that environment's settings.
The Default environment is created automatically for every application. It cannot be renamed or removed.
Adding and Removing Application Environments
- Add an environment — click the + button in the environment tab bar. A new environment tab is created and you can configure it immediately.
- Remove an environment — click the × button on the environment's tab. A confirmation prompt appears before the environment is permanently deleted. This action cannot be undone.
Configuring an Application Environment
Each environment has the following fields:
| Field | Required | Description |
|---|---|---|
| Name | Yes | The name of the environment. Must be unique across all environments in the application. |
| Description | No | An optional description of the environment. |
| Active | — | If checked, this environment is the active environment used during development and preview of the application. Only one environment can be active at a time. |
| Properties | — | A table of name/value pairs accessible at runtime via the $env service. Use this to store environment-specific configuration such as API keys, base URLs, or feature flags. |
Accessing Environment Properties at Runtime
Environment properties defined in the table are accessible in your application using the $env service:
-
Retrieve a specific property value:
1$env.getProperty('propertyName') -
Retrieve the name of the currently active environment:
1$env.current
This lets you write conditional logic based on the active environment — for example, enabling debug features in staging but not in production.
Helpful Resources
- Application Configuration — Overview of all configuration sections.
- Deployment Environments — How to deploy your application to different environments.
- Managing Environments — Add, configure, and manage deployment environments.
- Community Q&A: Bellini Community
Have a question? Post or search it here.