I want to set/change user variable in my windows/Linux system. one of them is my APP_SOME_VAR
variable.
When I run env
in the command line I'm getting a list of my user variables.
When I run this code in my file.js
it doesn't change my variable in the command line.
const { execSync } = require('child_process');
let output = execSync(`echo blabla && set APP_SOME_VAR=blabla`);
After I run the file, I do this in the command line:
node app.js
env | grep SOME
But I get nothing from: APP_SOME_VAR
How to do that with nodejs?