Query process.env when running in Node.js for getEnv

Ideally, the 'ENV' variable should be setup correctly. But I am not sure about conflicting values. This approach checks process.env as a fallback.