Environment variables entered via the Management Console are stored in $PLATFORM_VARIABLES. In Node, you may need to have them in process.env so that these UI-entered values override statically defined values in the code.
There are a few workarounds for this:
- Use the
env:prefix in the UI to expose them as normal environment variables. For example, settingenv:MY_VARwill create an environment variable called$MY_VARin your project's environments. - Make use of the platformsh-config library which can expose variables and other environment specific information to your application.
Comments
Please sign in to leave a comment.