How To Define Plugin Settings
The .amplicationrc.json
file lets you configure settings for your custom Amplication plugin.
This file lives at the root of your plugin directory.
It contains two properties at the root level:
settings
: User-facing configuration.systemSettings
: Internal configuration.
{
"settings": {
"host": "localhost",
"port": 27017,
"user": "admin",
"password": "admin",
"dbName": "my-db"
},
"systemSettings": {
"requireAuthenticationEntity": true
}
}
settings
The settings
property contains values that will appear in the Amplication UI when a user installs your plugin. This allows the user to customize your plugin's behavior.
For example:
"settings": {
"apiKey": "123456789",
"endpoint": "https://example.com/api"
}
Define all user-facing configuration in the settings
object.
systemSettings
The systemSettings
property is used to contain internal configuration that you as the plugin developer can use in your plugin's code. For example, you might want to do something during a plugin's installation or enforce prerequisites.
These settings are not visible to the user and are solely for use in your plugin's code.
requireAuthenticationEntity
is the only property available in the systemSettings configuration object. Also, systemSettings
is currently only available for internal developers and not community developers.
Examples
You can look at the .amplicationrc.json
file of the following plugins to get a sense for how to structure yours: