Error Screenshot[ I am using Node.js and have already set the enviroment varibale vidly_jwtPrivateKey. and try to retrieve it using config package using this command config.get('vidly_jwtPrivateKey')but i keep getting this error :
throw new Error('Configuration property "'+ property +'" is not defined'); Error: Configuration property "vidly_jwtPrivateKey" is not defined,
i have been searching for hours , could you please suggest a solution.
here is what my default.json file contains :
{"jwtPrivateKey" : ""}
and custom-environment-variables.json contain :
{"jwtPrivateKey" : "vidly_jwtPrivateKey"}
and i have already set vidly_jwtPrivateKey by exporting it in terminal (I use a Mac):
export vidly_jwtPrivateKey=mySecureKey.
I have tried this , but it doesn't work :
Here is the code I am suing to retrieve the environment variable:
if (!config.get('vidly_jwtPrivateKey')){ console.error('FATAL ERROR : jwtPrivateKey is not defined '), process.exit(1);};
Thanks a lot