The Configuration feature in the ComUnity Toolkit offers a comprehensive solution for managing application-wide settings, including the ability to configure settings for different deployment environments such as Development, Quality Assurance(QA), and Production. This powerful tool allows developers to easily tailor their application's behaviour and appearance to suit specific deployment environments.
All the configuration settings that exist in your project, including environment-specific configurations, are persisted in the Config service. This ensures that you can define and maintain separate settings for each environment, providing flexibility and control over the application's behaviour in different stages of the development and deployment lifecycle.
By leveraging the Configuration feature, developers can easily switch between different environment configurations within the ComUnity Toolkit. This allows them to define environment-specific settings such as AppName, BaseURL, ComsApi, WelcomeMessage, PushRootName, MediaServerUploadUrl, and more. Each environment can have its own distinct configuration values, enabling seamless transitions and consistent behaviour when deploying the application across different environments.
The persistence of environment-specific configuration settings in the Config service simplifies the management and maintenance of these settings. Developers can easily update and modify the configurations for each environment without directly modifying code, ensuring a clear separation between development and deployment concerns.
In summary, the Configuration feature in the ComUnity Toolkit empowers developers to set environment-specific configurations for Development, QA, and Production environments. By leveraging the Config service, developers can define and maintain distinct settings for each environment, ensuring flexibility, consistency, and optimal behaviour of their applications across different stages of the development and deployment lifecycle.
To add a configuration setting to your project, follow these steps:
Open your project in the Toolkit and navigate to Project Settings then select the Configuration tab.
Within the Configuration tab, you will find deployment environments displayed in a tab view. The initial tab labelled as Development, shows the system-generated settings for you development environment.
Locate the (+) Add a configuration setting button associated with a specific deployment environment.
Click on the button to add a new configuration setting for that particular environment.
In the modal window, provide a unique name for your configuration in the designated Name box the value of your application setting in the Value box.
Finally, click Add to create the configuration.
Once you've created the configuration settings, you can refer to them throughout your application. These settings are stored within the Config service and can be accessed and utilised in various parts of your application's code.
Below is a list of common system-generated configuration variables that you'll typically encounter when working with new projects in the ComUnity Platform's Development deployment environment:
AppName: The AppName variable represents the name or title of your application. It serves as an identifier within the ComUnity Platform, helping to distinguish your application from others during the development phase.
BaseUrl: The BaseUrl variable specifies the base URL or web address of your application. It defines the starting point for all relative URLs within your application and is essential for proper routing and navigation during development.
ComsApi: The ComsApi variable refers to the API endpoint or URL of the communication service within the ComUnity Platform. It enables your application to interact with the communication service, facilitating the exchange of messages, notifications, and other communication-related tasks during development.
ComsService: The ComsService variable is a URL that represents the specific communication service employed within the application.
ComsServicePassword: The ComsServicePassword variable stores the password or secret key associated with the communication service in the Development environment. It is instrumental in authenticating and securely accessing the service.
ComsServiceUsername: The ComsServiceUsername variable stores the username or identifier used for authentication and identification within the communication service during development. It allows your application to connect and interact with the service using the designated user or account within the Development environment.
MediaServerUploadUrl: The MediaServerUploadUrl variable denotes the URL or endpoint of the media server responsible for uploading and storing media files within the ComUnity Platform's Development environment. It enables your application to seamlessly upload images, videos, or other media content for use within the platform during development.
PublishedAppName: The PublishedAppName variable represents the name of your application as it appears to end users or the public within the Development environment. It is commonly utilised for displaying the application name in user interfaces or when referencing the published version of your application during development.
WelcomeMessage: The WelcomeMessage variable contains a pre-defined message or greeting displayed to users when they initially interact with your application in the Development environment. It serves as a friendly introduction or provides essential instructions to guide users through their initial experience during development.