Sunday, 9 April 2017

Node.js unset environment variable

How do you unset an environment variable in Node.js?

I've tried:

process.env.MYVAR = undefined

But that doesnt unset it, it appears as follows ..

console.log('xx' + process.env.MYVAR + 'xx');

Output is:

xxundefinedxx

I want:

xxxx

How do I make this work? thanks



via danday74

No comments:

Post a Comment