Entry: bootstrap_node.js Line 612: startup
The bootstrap_node. Js’s website: www.npmjs.com/package/boo…
- Module.runMain
The _cache array in the Module object holds modules that I’ve loaded in this session:
- Module.js runMain implementation:
Process. argv, like C/Java, holds the arguments for the current application run:
- Since I want to run websocket.js, I need to load it first:
- Module fs reads the websocket.js file and stores it as a string inside the content:
Then execute the module._compile method:
Inside the compile method, inspectorWrapper is used:
- Compile is to execute every line of my websocket. js file. Start with the first line of code:
For more of Jerry’s original articles, please follow the public account “Wang Zixi “: