I see some NodeJS programs executed like this PARAM=1;node program.js Im assuming its putting PARAM=1 into the environment. How do I access this in the node program? thanks,
Asked
Active
Viewed 711 times
1 Answers
0
Yes, PARAM=1
is setting an environment variable.
Depending on which shell you're using, you may need to use export PARAM=1
so the setting makes it to the child process. Otherwise the value would only exist for the shell.
As dystroy pointed out, the rest of your question is answered here.

Community
- 1
- 1

paulmelnikow
- 16,895
- 8
- 63
- 114