I am trying to set and retrieve node app process.env vars using package.json, so by researching the issue, I've found an example to set / retrieve process.env through the 'config' section, so I added a new config section as shown below :
config : { var1 : test, var2 : test2, var3 : test3 },
But I couldn't access any of the above vars from server.js using for example:
console.log(process.env.npm_package_config_var1);
So I was wondering how I can set / retrieve process.env var using package.json? Thanks
*I am using npm 4.4.1, node 7.4.0 and I run the app using (npm run dev)