-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,

1
  • You didn't search, did you ? Commented May 31, 2013 at 16:08

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.