What is the syntax for writing this command line command on Windows cmd.
MY_ENV_VAR=2 npm run my_script
or
MY_VAR1=100 MY_VAR2=300 npm run my_script
Basically I am trying to set the environment variables on my script.
Inside my index.js, for example, I have:
const MY_VAR1 = process.env.MY_VAR1 || 200;
Every time I run this on Windows cmd, I get "MY_VAR1 not recognized as internal or external command".
I have looked everywhere on the internet - this syntax seems to work on Mac but not on Windows cmd.
Please tell me the equivalent on Windows.
Of course, running
npm run my_script
runs fine.