I can't get environment variables to be set, or least, they aren't showing up in process.env in my application. I have tried both the array and object versions of the env key.
My code/fragment, pretty much straight from the example code:
// rp is the application path and is known to be defined (and tested for existence before this point)
let ev = { REACTOR_HOME: rp, NODE_PATH: rp };
if ( TZ ) {
ev.TZ = TZ;
}
console.log( "env", ev );
var svc = new Service({
name: 'Reactor',
description: 'Reactor (Multi-System) Service',
script: ap,
nodeOptions: [],
workingDirectory: rp,
env: ev
});
Yes, I need reading practice. Missed the subtlety of the name/value keys when specifying the pairing. Nothing to see here, folks... move along... move along.
I can't get environment variables to be set, or least, they aren't showing up in
process.env
in my application. I have tried both the array and object versions of theenv
key.My code/fragment, pretty much straight from the example code:
The debug/console.log output shows:
When the service starts, it logs that
process.env
is completely and totally empty. None of the variables passed is set.Any clue what I'm not catching a clue of my own on here?