I have a scenario like am having .env file for ENV variables. but on app start am updating some of ENV variable using process.env[VARIABLE_NAME] = newValue;
so if i use process.env.VARIABLE_NAME then its giving me updated value.
But in some file i have already assigned it to const
like
const variableVal = process.env.VARIABLE_NAME;
when i access variableVal
. it always return old value instead of updated one.
any expert of node to show the right path.