-1

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,

John Williams
  • 10,960
  • 4
  • 35
  • 47

1 Answers1

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,470
  • 7
  • 60
  • 112