MCPcopy Index your code
hub / github.com/nodejs/node / init

Function init

lib/internal/main/watch_mode.js:188–199  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

186}
187
188async function init() {
189 let child = start();
190 const restartChild = async ({ trigger } = kEmptyObject) => {
191 child = await restart(child, trigger);
192 };
193 watcher
194 .on('changed', restartChild)
195 .on('error', (error) => {
196 watcher.off('changed', restartChild);
197 triggerUncaughtException(error, true /* fromPromise */);
198 });
199}
200
201init();
202

Callers 1

watch_mode.jsFile · 0.70

Calls 3

startFunction · 0.70
onMethod · 0.45
offMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…