Environment Variables
Environment variables are a fundamental aspect of our platform, allowing you to configure and customize various aspects of your application's behavior.
Last updated
Environment variables are a fundamental aspect of our platform, allowing you to configure and customize various aspects of your application's behavior.
Last updated
Environment variables can be configured either during application creation or via the Environments section in the user interface sidebar.
The section for environment variables can be found at the bottom of the application creation page.
+ Add environment
The section for environment variables for already created applications can be found in the sidebar of the application -> section Environments
. From this place, you can create, edit, or delete existing environments.
Once an environment variable is set, you can access its value within your application's code. The method for accessing environment variables depends on the programming language or framework you are using. However, most languages provide a straightforward way to access environment variables, such as process.env
in Node.js or os.environ
in Python.
Environment variables are commonly used for:
Storing sensitive information, such as API keys or database credentials, without hardcoding them into your application's source code.
Configuring different settings for development, staging, and production environments.
Enabling feature flags or toggles to control specific functionality.
Providing customization options for your application's behavior.
To make the most of environment variables, consider the following best practices:
Use meaningful and descriptive names for your variables.
Ensure sensitive information is properly secured and not exposed in log files or error messages.
Document the required variables and their purpose for easy reference and onboarding of new team members.
By utilizing environment variables effectively, you can enhance the flexibility and security of your applications, enabling easier configuration and deployment across various environments.