Domanda

My node is running on the server along with many other nodes. Node's forever module is used for gracefully restarting nodes. Recently the forever module crashed on the server along with many other modules (We don't know which ones).

My node is running fine for now but I know that if I tried to restart my node i would have to do it manually coz forever is crashed.

What I want to know is, does my node running fine means my node modules are safe or I will only know when I restart my node? What I mean is are node modules loaded into memory when the node starts and any change in the modules is only reflected when node restart?

Thanx in advance!!

È stato utile?

Soluzione

Modules are cached by node.js when required. Any change to a module that was already required needs a restart of node.js. You can find a detailed description how require caching works in node.js in the node.js documentation.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top