While developing a React app, I needed to use some environment variables. The way to do it is by using this syntax:
REACT_APP_NOT_SECRET_CODE=abcdef npm start
My first question is: How does that work? I don't know this linux thing, what's happening behind the scenes?
My second question is: How to I make more scalable? say I have file that looks like that
MY_VAR_1=123
MY_VAR_2=23332
MY_VAR_3=3232
How do I inject it to the npm process? I tried
cat .env | npm start
But it doesn't work
I guess after I understand the linux syntax I get be in a better position to use a file instead of inline data.
Thanks