nodejs chaning env variable at runtime
It isn't possible to modify the env vars
of a running process. This isn't unique to
NodeJS processes. It's just how env vars
work on UNIX like operating systems.
The vars live within the address space of
the process. And while they are, typically,
initially placed at a well known location
near the top of the stack the current vars are
likely to be at an arbitrary address in the heap.
Env vars are intentionally private to each process.
So unless the program provides an API for
changing its env vars you can't
modify them once the program is running.