This is a simple module to manage .ENV variables.
With this extension you can change .ENV variable values, create new .ENV variables or simply return the value of an existing .ENV variable
Install as per these instructions.
DONT FORGET A WAPPLER RESTART AFTER INSTALL
Once installed the use will see a new server connect group called "Environment"
within this group you will see:
Add the component:
Enter the mandatory environment variable name, i enter "MY_NAME"
.ENV variables should be declared in CAPITALS, the module will force any name entered into capitals unless the "Allow Mixed case" checkbox is checked.
Next add a value, i add my name, "Brian English"
Lastly check "Output" if you wish to see the result
On running the API action, the module performs the following actions:
- if the .ENV variable exists and no value is sent from the module, it simply returns the current value
- If the .ENV variable exists and a value is sent, it's value is changed
- If the .ENV variable does not exist, it is created and it's value set
On this case the .ENV variable MY_NAME is created and given the value of "Brian English".
In all cases the module returns the current value of the .ENV variable in exit
{"Env1":"Brian English"}
NOTE. These changes are not written to app/config/config.json, they are dynamic in nature.
Changes will be lost, default values restored and new variables cleared on server start