A
A
Artyom Zubkov2014-09-23 10:01:39
JavaScript
Artyom Zubkov, 2014-09-23 10:01:39

How to track changes in environment variables in nodejs?

There is a script that should look at a certain environment variable and, depending on its value, perform some action.
So how do you get the new value of a variable if it changes?
UPD:
Perhaps it is important to describe what it is for.
It is necessary to react to certain changes in the system without restarting app.js. In particular, after performing a certain task, a variable is set in the system that I would like to monitor from app.js.
UPD 2:
It may be possible to dodge somehow, of course, through exec
But for now I will not put my mind to it.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Zhak, 2014-09-23
@artzub

Watcher can be written.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question