If I write:
myVar = 123; // note the missing var keyword
is there an object in NodeJs where I can retrieve this variable from?
In a browser this would be:
Node's globals are stored in the
global variable and is documented here. Since "global" variables are local to each module,
global is the true global variable that is shared across modules.
This recipe can be found in it's original form on Stack Over Flow.