I am in production environment on a vps that has linux. I have a file where I try to set my environment variables.
my variables are in a file called environment.js
.
the content of my file is like this:
process.env.NODE_ENV = "prod";
console.log(process.env.NODE_ENV);
process.env.SEED = "seed";
console.log(process.env.SEED);
process.env.SEED_PORTAL = "seed_bee"
console.log(process.env.SEED_PORTAL);
process.env.HOST = "http://3.86.232.97";
then I run
node environment.js
and I would expect the values to persist, but these variables are not global, they appear as undefined where I try to use them in other projects where I use nodejs
why?